1

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:

  1. This answer
  2. Running the node command prompt as administrator
  3. 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.

Bernardo SOUSA
  • 415
  • 4
  • 13

1 Answers1

1

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.

Bernardo SOUSA
  • 415
  • 4
  • 13