expo start command not running - node.js

Using expo to work on my react native projects using expo start always worked before. Now it doesn't work, so I reinstalled node.js. I installed expo using npm install -g expo-cli but expo start gave me:
'expo' is not recognized as an internal or external command,
operable program or batch file.
I checked my error file and this is what it says:
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 'start' ]
2 info using npm#6.4.1
3 info using node#v10.14.2
4 verbose run-script [ 'prestart', 'start', 'poststart' ]
5 info lifecycle #~prestart: #
6 info lifecycle #~start: #
7 verbose lifecycle #~start: unsafe-perm in lifecycle true
8 verbose lifecycle #~start: PATH: C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin;C:\Users\Linda\Documents\U of T Engineering\2018\Jobs\IoT for Education\alarmApp\node_modules\.bin;C:\Python27\;C:\Python27\Scripts;C:\ProgramData\Boxstarter;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\ProgramData\Oracle\Java\javapath;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Program Files\Intel\WiFi\bin\;C:\Program Files\Common Files\Intel\WirelessCommon\;C:\TDM-GCC-64\bin;C:\Program Files\Git\cmd;C:\Python3;C:\Python3\Scripts;C:\Program Files\PuTTY\;C:\Program Files\MATLAB\R2017b\bin;C:\Go\bin;C:\WINDOWS\System32\OpenSSH\;C:\ProgramData\chocolatey\bin;C:\xampp\php;C:\ProgramData\ComposerSetup\bin;C:\Program Files\nodejs\;C:\Users\Linda\AppData\Local\Programs\Python\Python36-32\Scripts\;C:\Users\Linda\AppData\Local\Programs\Python\Python36-32\;C:\Users\Linda\AppData\Local\Microsoft\WindowsApps;C:\Users\Linda\AppData\Local\atom\bin;C:\altera_lite\16.0\modelsim_ase\win32aloem;C:\Users\Linda\AppData\Local\Microsoft\WindowsApps;C:\Users\Linda\go\bin;C:\Program Files\Docker Toolbox;;C:\Program Files\Docker Toolbox;C:\Program Files\Docker Toolbox;C:\Users\Linda\AppData\Roaming\Composer\vendor\bin;C:\Users\Linda\AppData\Roaming\npm
9 verbose lifecycle #~start: CWD: C:\Users\Linda\Documents\U of T Engineering\2018\Jobs\IoT for Education\alarmApp
10 silly lifecycle #~start: Args: [ '/d /s /c', 'expo start' ]
11 silly lifecycle #~start: Returned: code: 1 signal: null
12 info lifecycle #~start: Failed to exec start script
13 verbose stack Error: # start: `expo 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:301:16)
13 verbose stack at EventEmitter.emit (events.js:182: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:182:13)
13 verbose stack at maybeClose (internal/child_process.js:962:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:251:5)
14 verbose pkgid #
15 verbose cwd C:\Users\Linda\Documents\U of T Engineering\2018\Jobs\IoT for Education\alarmApp
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" "start"
18 verbose node v10.14.2
19 verbose npm v6.4.1
20 error code ELIFECYCLE
21 error errno 1
22 error # start: `expo start`
22 error Exit status 1
23 error Failed at the # start script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]
I have no idea why expo stopped working and what the error file means. Please help! Thanks.

I fixed it! I don't know why this works but:
npm i expo-cli then run npm start.

First check if /users/[you]/.npm-global/bin is in your path.
echo $PATH
If it isn’t there, you will need to add it to the path.
in a shell type:
export PATH=$PATH:~/.npm-global/bin
source ~/.bash_profile
if you run
> expo
in the shell now, the command should be recognized...

Use the vscode terminal, after clearing cache

Try these commands, I have fixed the issue. Try it
expo r -c

For some reason, the update messed with the path. So I had to go to edit environment variables and add another line to the variable "Path" under the system variables.
Don't hit new. Click on "Path" under the system variables section and add a new line there. Use "%USERPROFILE%\AppData\Roaming\npm".
Then open a new command line and it should work.

Related

Mocha test fails without giving proper error

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

Not able to run NPM Start after create-react-app

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?

Error: spawn cmd ENOENT while starting React APP

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

Angular running error Object prototype may only be an Object or null: undefined

I have Angular application with several npm dependency in package.json. When i try to install the npm dependency npm i getting some sha1 seems to be corrupted issue. For that I delete the package-lock.json and then i can install all the npm dependency successfully. But npm start can't able to run the application showing error as
An unhandled exception occurred: Object prototype may only be an Object or null: undefined
Error log
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 'start' ]
2 info using npm#6.4.1
3 info using node#v10.15.0
4 verbose run-script [ 'prestart', 'start', 'poststart' ]
5 info lifecycle ruf-stable#0.0.0~prestart: ruf-stable#0.0.0
6 info lifecycle ruf-stable#0.0.0~start: ruf-stable#0.0.0
7 verbose lifecycle ruf-stable#0.0.0~start: unsafe-perm in lifecycle true
8 verbose lifecycle ruf-stable#0.0.0~start: PATH: C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin;C:\workspace\myworkspace\2020\fis-employee-ui\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)\Git\cmd;C:\Program Files\PuTTY\;C:\Program Files\nodejs\;C:\Program Files\Java\jdk1.8.0_212\bin;C:\Program Files\Java\jre1.8.0_212\bin;C:\Program Files (x86)\MySQL\MySQL Utilities 1.6\;C:\Users\e5608029\AppData\Local\Programs\Python\Python37\Scripts\;C:\Users\e5608029\AppData\Local\Programs\Python\Python37\;C:\Users\e5608029\AppData\Local\Microsoft\WindowsApps;C:\Users\e5608029\AppData\Roaming\npm;C:\Users\e5608029\AppData\Local\Programs\Microsoft VS Code\bin
9 verbose lifecycle ruf-stable#0.0.0~start: CWD: C:\workspace\myworkspace\2020\fis-employee-ui
10 silly lifecycle ruf-stable#0.0.0~start: Args: [ '/d /s /c',
10 silly lifecycle 'ng serve --host 0.0.0.0 --proxy-config proxy.conf.json' ]
11 info lifecycle ruf-stable#0.0.0~start: Failed to exec start script
12 verbose stack Error: ruf-stable#0.0.0 start: `ng serve --host 0.0.0.0 --proxy-config proxy.conf.json`
12 verbose stack spawn ENOENT
12 verbose stack at ChildProcess.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\lib\spawn.js:48:18)
12 verbose stack at ChildProcess.emit (events.js:182:13)
12 verbose stack at maybeClose (internal/child_process.js:962:16)
12 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:251:5)
13 verbose pkgid ruf-stable#0.0.0
14 verbose cwd C:\workspace\myworkspace\2020\fis-employee-ui
15 verbose Windows_NT 10.0.17134
16 verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "start"
17 verbose node v10.15.0
18 verbose npm v6.4.1
19 error file C:\windows\system32\cmd.exe
20 error code ELIFECYCLE
21 error errno ENOENT
22 error syscall spawn
23 error ruf-stable#0.0.0 start: `ng serve --host 0.0.0.0 --proxy-config proxy.conf.json`
23 error spawn ENOENT
24 error Failed at the ruf-stable#0.0.0 start script.
24 error This is probably not a problem with npm. There is likely additional logging output above.
25 verbose exit [ 1, true ]
Try npm install again after deleting the existing file. then retry npm start. if still not working try to upgrade your project by 'ng update #angular/cli #angular/core' Command.
you have to do few more changed as mentioned here

Node ends with error Exit status 3221225786

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.

Resources