As I am learning the react for the first time I need to install the react-app but getting below error.
I have tried everything from the instructions in the error log and several other available solutions of StackOverflow but still not able to solve and getting the same error.
Here is the pic of below:
And here is the log:
0 info it worked if it ends with ok
1 verbose cli [
1 verbose cli 'C:\\Program Files\\nodejs\\node.exe',
1 verbose cli 'C:\\Users\\Mr Rushil Dewaskar\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli 'start'
1 verbose cli ]
2 info using npm#6.14.5
3 info using node#v12.17.0
4 verbose run-script [ 'prestart', 'start', 'poststart' ]
5 info lifecycle jsfx#0.1.0~prestart: jsfx#0.1.0
6 info lifecycle jsfx#0.1.0~start: jsfx#0.1.0
7 verbose lifecycle jsfx#0.1.0~start: unsafe-perm in lifecycle true
8 verbose lifecycle jsfx#0.1.0~start: PATH: C:\Users\Mr Rushil Dewaskar\AppData\Roaming\npm\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin;C:\Users\Mr Rushil Dewaskar\jsfx\node_modules\.bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\system32\Wbem;C:\Python38\Scripts\;C:\Python38\;C:\Program Files (x86)\Common Files\ArcSoft\Bin;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;C:\Program Files\Java\jdk-11.0.4;C:\Program Files (x86)\Brackets\command;C:\Program Files\Git\cmd;C:\ProgramData\chocolatey\bin;C:\Program Files\nodejs\;C:\Users\Mr Rushil Dewaskar\AppData\Local\Programs\Python\Python38-32\Scripts\;C:\Users\Mr Rushil Dewaskar\AppData\Local\Programs\Python\Python38-32\;C:\Windows\System32\wbem\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\system32\Wbem;C:\Python38\Scripts\;C:\Python38\;C:\Program Files (x86)\Common Files\ArcSoft\Bin;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;C:\Program Files\Java\jdk-11.0.4;C:\Program Files (x86)\Brackets\command;C:\Program Files\Git\cmd;C:\ProgramData\chocolatey\bin;C:\Program Files\nodejs\;C:\Users\Mr Rushil Dewaskar\AppData\Local\Programs\Microsoft VS Code\bin;C:\Users\Mr Rushil Dewaskar\AppData\Roaming\npm;C:\Windows\System32\ variable;C:\Windows\System32\;
9 verbose lifecycle jsfx#0.1.0~start: CWD: C:\Users\Mr Rushil Dewaskar\jsfx
10 silly lifecycle jsfx#0.1.0~start: Args: [ '/d /s /c', 'react-scripts start' ]
11 silly lifecycle jsfx#0.1.0~start: Returned: code: 1 signal: null
12 info lifecycle jsfx#0.1.0~start: Failed to exec start script
13 verbose stack Error: jsfx#0.1.0 start: `react-scripts start`
13 verbose stack Exit status 1
13 verbose stack at EventEmitter.<anonymous> (C:\Users\Mr Rushil Dewaskar\AppData\Roaming\npm\node_modules\npm\node_modules\npm-lifecycle\index.js:332:16)
13 verbose stack at EventEmitter.emit (events.js:315:20)
13 verbose stack at ChildProcess.<anonymous> (C:\Users\Mr Rushil Dewaskar\AppData\Roaming\npm\node_modules\npm\node_modules\npm-lifecycle\lib\spawn.js:55:14)
13 verbose stack at ChildProcess.emit (events.js:315:20)
13 verbose stack at maybeClose (internal/child_process.js:1021:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)
14 verbose pkgid jsfx#0.1.0
15 verbose cwd C:\Users\Mr Rushil Dewaskar\jsfx
16 verbose Windows_NT 10.0.18363
17 verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\Mr Rushil Dewaskar\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js" "start"
18 verbose node v12.17.0
19 verbose npm v6.14.5
20 error code ELIFECYCLE
21 error errno 1
22 error jsfx#0.1.0 start: `react-scripts start`
22 error Exit status 1
23 error Failed at the jsfx#0.1.0 start script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]
Please Help As soon as possible.
The solution to your problem is to remove the whitespaces in your username. In fact, the whitespaces anywhere in your path.
In your case, your username is Mr Rushil Dewasker. That's two whitespaces.
Change it to something without spaces and rebuild your project. It should work fine after that.
I had this problem once, myself.
Well the error itself shows some way to solve this issue. Have you tried that?
Related
I have setup mocha to run test on my express application. However mocha test fails every time I run npm test without giving any error refer to the screen
here is my snippet of my package.json, my folder structure and code
I tried running mocha manually also but it doesn't print anything. it just exit the process. lastly i tried running it in the debug mode and here is the log of debug mode
0 info it worked if it ends with ok
1 verbose cli [
1 verbose cli 'C:\\Program Files\\nodejs\\node.exe',
1 verbose cli 'C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli 'run',
1 verbose cli 'test'
1 verbose cli ]
2 info using npm#6.14.10
3 info using node#v14.15.4
4 verbose run-script [ 'pretest', 'test', 'posttest' ]
5 info lifecycle data-central#1.0.0~pretest: data-central#1.0.0
6 info lifecycle data-central#1.0.0~test: data-central#1.0.0
7 verbose lifecycle data-central#1.0.0~test: unsafe-perm in lifecycle true
8 verbose lifecycle data-central#1.0.0~test: PATH: C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin;E:\The expert Institute\data-central-backend\node_modules\.bin;C:\Program Files\Git\mingw64\bin;C:\Program Files\Git\usr\bin;C:\Users\Admin\bin;C:\Program Files\Python39\Scripts;C:\Program Files\Python39;C:\Program Files\Common Files\Oracle\Java\javapath;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Windows\System32\OpenSSH;C:\Program Files\nodejs;C:\Program Files\Git\cmd;C:\Program Files\Java\jdk-11.0.9\bin;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Amazon\AWSCLIV2;C:\Users\Admin\AppData\Local\Microsoft\WindowsApps;C:\Users\Admin\AppData\Local\Programs\Microsoft VS Code\bin;C:\Users\Admin\AppData\Roaming\npm;C:\Program Files (x86)\Terraform;C:\Users\Admin\AppData\Roaming\Python\Python39\Scripts
9 verbose lifecycle data-central#1.0.0~test: CWD: E:\The expert Institute\data-central-backend
10 silly lifecycle data-central#1.0.0~test: Args: [ '/d /s /c', "mocha './tests/*.test.js'" ]
11 silly lifecycle data-central#1.0.0~test: Returned: code: 1 signal: null
12 info lifecycle data-central#1.0.0~test: Failed to exec test script
13 verbose stack Error: data-central#1.0.0 test: `mocha './tests/*.test.js'`
13 verbose stack Exit status 1
13 verbose stack at EventEmitter.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\index.js:332:16)
13 verbose stack at EventEmitter.emit (events.js:315:20)
13 verbose stack at ChildProcess.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\lib\spawn.js:55:14)
13 verbose stack at ChildProcess.emit (events.js:315:20)
13 verbose stack at maybeClose (internal/child_process.js:1048:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:288:5)
14 verbose pkgid data-central#1.0.0
15 verbose cwd E:\The expert Institute\data-central-backend
16 verbose Windows_NT 10.0.19042
17 verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "run" "test"
18 verbose node v14.15.4
19 verbose npm v6.14.10
20 error code ELIFECYCLE
21 error errno 1
22 error data-central#1.0.0 test: `mocha './tests/*.test.js'`
22 error Exit status 1
23 error Failed at the data-central#1.0.0 test script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]
Operating system - windows 10
Node version - 14 LTS
NPM version - 6.14.10
Answer to this problem was very quite simple. My node server was already running on port 3000. now when I ran npm test, chai-http was starting the node server again see this line
no two server can run on same port, so my node process was exiting upon port conflict and it wasn't giving me any error that why my test was not working
I've been banging my head against the proverbial wall for too long and wondering if anyone has experienced the same issue and how they've managed to resolve it.
In a nutshell, testcafe scripts work as expected when remotely loging in to my work desktop, however, if I run the same testcafe scripts through a VPN then I get A request to "https://website.com/page" has failed.
This is my package.json
"ssc": "testcafe chrome ./Fixtures/
This is the code that I'm using to connect to the website:
fixture `Checking layout of website`.page `https://website.com/page`
.beforeEach( async t=>
{
console.log("Logging in")
await t.useRole(regularAccUser);
})
test('Checking stuff', async t=>
{
await t.takeScreenshot()
})
The error being displayed:
**A request to "https://website.com/page" has failed.
Use quarantine mode to perform additional attempts to execute this test.
You can find troubleshooting information for this issue at "https://go.devexpress.com/TestCafe_FAQ_ARequestHasFailed.aspx".
Error details:
Failed to perform a request to the resource at "https://website.com/page" because of an error.
Error: Parse Error**
The following is the log file:
0 info it worked if it ends with ok
1 verbose cli [ 'C:\\Program Files\\nodejs\\node.exe',
1 verbose cli 'C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli 'run',
1 verbose cli 'ssc' ]
2 info using npm#6.14.4
3 info using node#v10.21.0
4 verbose run-script [ 'pressc', 'ssc', 'postssc' ]
5 info lifecycle smoke9#0.0.0~pressc: smoke9#0.0.0
6 info lifecycle smoke9#0.0.0~ssc: smoke9#0.0.0
7 verbose lifecycle smoke9#0.0.0~ssc: unsafe-perm in lifecycle true
8 verbose lifecycle smoke9#0.0.0~ssc: PATH: C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin;C:\Automation\smoke\node_modules\.bin;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\windows\system32;C:\windows;C:\windows\System32\Wbem;C:\windows\System32\WindowsPowerShell\v1.0\;C:\windows\System32\OpenSSH\;C:\Program Files (x86)\Microsoft SQL Server\150\DTS\Binn\;C:\Program Files\Git\cmd;C:\Users\ext-krishnanv\Desktop\Eclipse\eclipse\java-1.8.0-openjdk-1.8.0.222-2.b10.ojdkbuild.windows.x86_64\bin;C:\Installation\spark-2.2.1\bin;C:\Installation\scala\bin;C:\Anaconda3;C:\Anaconda3\Scripts;C:\Program Files\Microsoft VS Code\bin;C:\Program Files\nodejs\;C:\Program Files\Docker\Docker\resources\bin;C:\ProgramData\DockerDesktop\version-bin;C:\apache-jmeter-5.3\bin;C:\Users\beckettj1\AppData\Local\Microsoft\WindowsApps;C:\Users\<username>\AppData\Roaming\npm
9 verbose lifecycle smoke9#0.0.0~ssc: CWD: C:\Automation\smoke
10 silly lifecycle smoke9#0.0.0~ssc: Args: [ '/d /s /c', 'testcafe chrome ./Fixtures/<subdirectory>/' ]
11 silly lifecycle smoke9#0.0.0~ssc: Returned: code: 1 signal: null
12 info lifecycle smoke9#0.0.0~ssc: Failed to exec ssc script
13 verbose stack Error: smoke9#0.0.0 ssc: `testcafe chrome ./Fixtures/<subdirectory>/`
13 verbose stack Exit status 1
13 verbose stack at EventEmitter.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\index.js:332:16)
13 verbose stack at EventEmitter.emit (events.js:198:13)
13 verbose stack at ChildProcess.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\lib\spawn.js:55:14)
13 verbose stack at ChildProcess.emit (events.js:198:13)
13 verbose stack at maybeClose (internal/child_process.js:982:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:259:5)
14 verbose pkgid smoke9#0.0.0
15 verbose cwd C:\Automation\smoke
16 verbose Windows_NT 10.0.17134
17 verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "run" "ssc"
18 verbose node v10.21.0
19 verbose npm v6.14.4
20 error code ELIFECYCLE
21 error errno 1
22 error smoke9#0.0.0 ssc: `testcafe chrome ./Fixtures/<subdirectory>/`
22 error Exit status 1
23 error Failed at the smoke9#0.0.0 ssc script. **<----IS THIS A RED HERRING??---->**
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]
./Fixtures/ is the location of all my js/ts scripts
I am trying to compile my node server using nexe (3.3.2) but it keeps failing. When I first tried, it said I needed to use the --build flag which I included in my script. The process kicked off again, compiled for over two hours and then failed.
I upgraded my node and npm versions using Homebrew, it didn't work. I thought it might be the size of the folders I've included but even if I just include my server.js, it fails.
Does anyone have any ideas for me please? Below is a copy of the latest log file.
0 info it worked if it ends with ok
1 verbose cli [
1 verbose cli '/usr/local/lib/node_modules/node/bin/node',
1 verbose cli '/usr/local/bin/npm',
1 verbose cli 'run',
1 verbose cli 'build'
1 verbose cli ]
2 info using npm#6.14.4
3 info using node#v13.8.0
4 verbose run-script [ 'prebuild', 'build', 'postbuild' ]
5 info lifecycle robson-callcentre#0.1.0~prebuild: robson-callcentre#0.1.0
6 info lifecycle robson-callcentre#0.1.0~build: robson-callcentre#0.1.0
7 verbose lifecycle robson-callcentre#0.1.0~build: unsafe-perm in lifecycle true
8 verbose lifecycle robson-callcentre#0.1.0~build: PATH: /usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/Users/darryllrobinson/Documents/projects/Source/fonebookeohcollections/server/node_modules/.bin:/usr/local/opt/openssl/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/go/bin
9 verbose lifecycle robson-callcentre#0.1.0~build: CWD: /Users/darryllrobinson/Documents/projects/Source/fonebookeohcollections/server
10 silly lifecycle robson-callcentre#0.1.0~build: Args: [ '-c', 'nexe server.js --build' ]
11 silly lifecycle robson-callcentre#0.1.0~build: Returned: code: 1 signal: null
12 info lifecycle robson-callcentre#0.1.0~build: Failed to exec build script
13 verbose stack Error: robson-callcentre#0.1.0 build: `nexe server.js --build`
13 verbose stack Exit status 1
13 verbose stack at EventEmitter.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:332:16)
13 verbose stack at EventEmitter.emit (events.js:321:20)
13 verbose stack at ChildProcess.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
13 verbose stack at ChildProcess.emit (events.js:321:20)
13 verbose stack at maybeClose (internal/child_process.js:1026:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)
14 verbose pkgid robson-callcentre#0.1.0
15 verbose cwd /Users/darryllrobinson/Documents/projects/Source/fonebookeohcollections/server
16 verbose Darwin 19.4.0
17 verbose argv "/usr/local/lib/node_modules/node/bin/node" "/usr/local/bin/npm" "run" "build"
18 verbose node v13.8.0
19 verbose npm v6.14.4
20 error code ELIFECYCLE
21 error errno 1
22 error robson-callcentre#0.1.0 build: `nexe server.js --build`
22 error Exit status 1
23 error Failed at the robson-callcentre#0.1.0 build script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]
I wasn't able to resolve the problem so I used pkg instead.
I am creating a React Application. I ran the following command in cmd:
npx create-react-app .
Thereafter I tried to start the server using npm start as instructed in the tutorial:
https://github.com/facebook/create-react-app.
However, I keep getting the following error:
Error: spawn cmd ENOENT.
The log report generated by the error is:
0 info it worked if it ends with ok
1 verbose cli [
1 verbose cli 'C:\\Program Files\\nodejs\\node.exe',
1 verbose cli 'C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli 'start'
1 verbose cli ]
2 info using npm#6.10.2
3 info using node#v12.9.1
4 verbose run-script [ 'prestart', 'start', 'poststart' ]
5 info lifecycle react_todo#0.1.0~prestart: react_todo#0.1.0
6 info lifecycle react_todo#0.1.0~start: react_todo#0.1.0
7 verbose lifecycle react_todo#0.1.0~start: unsafe-perm in lifecycle true
8 verbose lifecycle react_todo#0.1.0~start: PATH: C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin;E:\Projects\react_todo\node_modules\.bin;C:\Program Files\Java\jdk1.8.0_181\bin;C:\Program Files\nodejs\;C:\ProgramData\chocolatey\bin;E:\Projects\shopping-cart\node_modules\express-generator\bin;C:\Program Files\Git\cmd;C:\Program Files\PuTTY\;C:\Users\Arun\AppData\Local\Programs\Python\Python37-32\Scripts\;C:\Users\Arun\AppData\Local\Programs\Python\Python37-32\;C:\Users\Arun\AppData\Local\Programs\Microsoft VS Code\bin;C:\Program Files (x86)\EasyPHP-Devserver-17\eds-binaries\dbserver\mysql5717x86x191225091928\bin;
9 verbose lifecycle react_todo#0.1.0~start: CWD: E:\Projects\react_todo
10 silly lifecycle react_todo#0.1.0~start: Args: [ '/d /s /c', 'react-scripts start' ]
11 silly lifecycle react_todo#0.1.0~start: Returned: code: 1 signal: null
12 info lifecycle react_todo#0.1.0~start: Failed to exec start script
13 verbose stack Error: react_todo#0.1.0 start: `react-scripts start`
13 verbose stack Exit status 1
13 verbose stack at EventEmitter.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\index.js:326:16)
13 verbose stack at EventEmitter.emit (events.js:209:13)
13 verbose stack at ChildProcess.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\lib\spawn.js:55:14)
13 verbose stack at ChildProcess.emit (events.js:209:13)
13 verbose stack at maybeClose (internal/child_process.js:1021:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:283:5)
14 verbose pkgid react_todo#0.1.0
15 verbose cwd E:\Projects\react_todo
16 verbose Windows_NT 6.1.7600
17 verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "start"
18 verbose node v12.9.1
19 verbose npm v6.10.2
20 error code ELIFECYCLE
21 error errno 1
22 error react_todo#0.1.0 start: `react-scripts start`
22 error Exit status 1
23 error Failed at the react_todo#0.1.0 start script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]
It would be really helpful if could suggest me a way to resolve this issue. Thank You.
I resolved the issue by following these steps if anyone needs it in future:
Goto > Control Panel\System and Security\System\Advance system setting\Enviroment variable and set system variables path C:\Windows\System32\ variable and restart your System.
This comment really helped me out: https://github.com/facebook/create-react-app/issues/6908#issuecomment-495064048.
You should install create-react-app globally with -g.
npm install -g create-react-app
Alternatively, you could skip the installation of create-react-app.
For that you need firstly to update to a newer version of nodejs and npm and then you can run.
npx create-react-app yourappname
Good day everyone!
On package.json, I have a line under scripts that reads "serve": "node index -test". If I run node index -test directly in the Node command prompt, the error doesn't occur. If I run npm run serve, which is suppose to do the same thing, the error occurs when I stop the process with Ctrl+C. Here's the log:
0 info it worked if it ends with ok
1 verbose cli [ 'C:\\Program Files\\nodejs\\node.exe',
1 verbose cli 'C:\\Users\\SOUSA\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli 'run',
1 verbose cli 'serve' ]
2 info using npm#6.0.1
3 info using node#v10.1.0
4 verbose run-script [ 'preserve', 'serve', 'postserve' ]
5 info lifecycle alloy-server#3.0.0~preserve: alloy-server#3.0.0
6 info lifecycle alloy-server#3.0.0~serve: alloy-server#3.0.0
7 verbose lifecycle alloy-server#3.0.0~serve: unsafe-perm in lifecycle true
8 verbose lifecycle alloy-server#3.0.0~serve: PATH: C:\Users\SOUSA\AppData\Roaming\npm\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin;C:\Alloy_Server_v3\node_modules\.bin;C:\Users\SOUSA\AppData\Roaming\npm;C:\Program Files\nodejs\;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\ProgramData\Oracle\Java\javapath;C:\Program Files\ImageMagick-6.9.3-Q16;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files\ImageMagick-6.9.1-Q16;C:\Program Files\ImageMagick-6.9.0-Q16;C:\Program Files (x86)\Common Files\Intel\Shared Files\cpp\bin\Intel64;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\ATI Technologies\ATI.ACE\Core-Static;C:\Program Files (x86)\git\cmd;C:\Program Files (x86)\Windows Live\Shared;C:\ProgramData\chocolatey\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\GtkSharp\2.12\bin;C:\Program Files\Microsoft SQL Server\110\Tools\Binn\;C:\Program Files (x86)\Microsoft SDKs\TypeScript\1.0\;C:\Program Files\Microsoft SQL Server\130\Tools\Binn\;C:\Program Files\Git\cmd;C:\Program Files\PuTTY\;C:\Program Files\nodejs\;C:\Users\SOUSA\.cargo\bin;C:\NVPACK\gradle-2.9\bin;C:\NVPACK\jdk1.8.0_77\bin;C:\Users\SOUSA\AppData\Local\Microsoft\WindowsApps;C:\Program Files\Microsoft VS Code\bin;C:\Users\SOUSA\AppData\Local\Microsoft\WindowsApps;C:\Users\SOUSA\AppData\Roaming\npm
9 verbose lifecycle alloy-server#3.0.0~serve: CWD: C:\Alloy_Server_v3
10 silly lifecycle alloy-server#3.0.0~serve: Args: [ '/d /s /c', 'node index -test' ]
11 silly lifecycle alloy-server#3.0.0~serve: Returned: code: 3221225786 signal: null
12 info lifecycle alloy-server#3.0.0~serve: Failed to exec serve script
13 verbose stack Error: alloy-server#3.0.0 serve: `node index -test`
13 verbose stack Exit status 3221225786
13 verbose stack at EventEmitter.<anonymous> (C:\Users\SOUSA\AppData\Roaming\npm\node_modules\npm\node_modules\npm-lifecycle\index.js:283:16)
13 verbose stack at EventEmitter.emit (events.js:182:13)
13 verbose stack at ChildProcess.<anonymous> (C:\Users\SOUSA\AppData\Roaming\npm\node_modules\npm\node_modules\npm-lifecycle\lib\spawn.js:55:14)
13 verbose stack at ChildProcess.emit (events.js:182:13)
13 verbose stack at maybeClose (internal/child_process.js:957:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:246:5)
14 verbose pkgid alloy-server#3.0.0
15 verbose cwd C:\Alloy_Server_v3
16 verbose Windows_NT 10.0.16299
17 verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\SOUSA\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js" "run" "serve"
18 verbose node v10.1.0
19 verbose npm v6.0.1
20 error code ELIFECYCLE
21 error errno 3221225786
22 error alloy-server#3.0.0 serve: `node index -test`
22 error Exit status 3221225786
23 error Failed at the alloy-server#3.0.0 serve script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 3221225786, true ]
Things that I tried to no avail:
This answer
Running the node command prompt as administrator
Creating a new folder, copying source files there and running npm install
I have been looking for more information on this Exit status 3221225786, but after three hours I still can't solve the problem. Any help is much appreciated.
EDIT: the error also doesn't happen when I user the VS Code console. It only happens with the Node.js command prompt.
In case someone stumbles across the same error, the problem went away when I updated to Node 10.2.0 and NPM 6.0.1. So I guess updating, or maybe fresh installing, can solve it.