15

This is the error itself in the command line:

npm ERR! code ELIFECYCLE
npm ERR! errno 3221225477
npm ERR! versioncenter@0.0.1 start: `node ./bin/www`
npm ERR! Exit status 3221225477
npm ERR!
npm ERR! Failed at the versioncenter@0.0.1 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\USERNAME\AppData\Roaming\npm-cache\_logs\2019-11-13T17_17_52_250Z-debug.log
/c/Program Files/nodejs/npm: line 37:  1341 Segmentation fault      "$NODE_EXE" "$NPM_CLI_JS" "$@"

This is the error 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:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli   'run',
1 verbose cli   'start'
1 verbose cli ]
2 info using npm@6.11.3
3 info using node@v12.11.1
4 verbose run-script [ 'prestart', 'start', 'poststart' ]
5 info lifecycle versioncenter@0.0.1~prestart: versioncenter@0.0.1
6 info lifecycle versioncenter@0.0.1~start: versioncenter@0.0.1
7 verbose lifecycle versioncenter@0.0.1~start: unsafe-perm in lifecycle true
8 verbose lifecycle versioncenter@0.0.1~start: PATH: C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin;C:\version_center\node_modules\.bin;C:\Users\USERNAME\bin;C:\Program Files\Git\mingw64\bin;C:\Program Files\Git\usr\local\bin;C:\Program Files\Git\usr\bin;C:\Program Files\Git\usr\bin;C:\Program Files\Git\mingw64\bin;C:\Program Files\Git\usr\bin;C:\Users\USERNAME\bin;C:\Python27;C:\Python27\Scripts;C:\app\client\USERNAME\product\12.2.0\client_1;C:\app\client\USERNAME\product\12.2.0\client_1\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0;C:\Program Files\PuTTY;C:\Program Files\Git\cmd;C:\Program Files\nodejs;C:\ProgramData\chocolatey\bin;C:\Users\USERNAME\AppData\Local\Microsoft\WindowsApps;C:\Users\USERNAME\AppData\Local\Programs\Microsoft VS Code\bin;C:\Users\USERNAME\AppData\Local\Programs\Fiddler;C:\Users\USERNAME\AppData\Roaming\npm;C:\app\instantclient_19_3;C:\Program Files\nodejs\node.exe;C:\Program Files\Git\usr\bin\vendor_perl;C:\Program Files\Git\usr\bin\core_perl
9 verbose lifecycle versioncenter@0.0.1~start: CWD: C:\version_center
10 silly lifecycle versioncenter@0.0.1~start: Args: [ '/d /s /c', 'node ./bin/www' ]
11 silly lifecycle versioncenter@0.0.1~start: Returned: code: 3221225477  signal: null
12 info lifecycle versioncenter@0.0.1~start: Failed to exec start script
13 verbose stack Error: versioncenter@0.0.1 start: `node ./bin/www`
13 verbose stack Exit status 3221225477
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:210:5)
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:210:5)
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 versioncenter@0.0.1
15 verbose cwd C:\version_center
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" "start"
18 verbose node v12.11.1
19 verbose npm  v6.11.3
20 error code ELIFECYCLE
21 error errno 3221225477
22 error versioncenter@0.0.1 start: `node ./bin/www`
22 error Exit status 3221225477
23 error Failed at the versioncenter@0.0.1 start script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 3221225477, true ]

Scripts:

"scripts": { "watch": "pm2 logs", "start": "pm2 start ./bin/www --watch --ignore-watch='node_modules' --max-memory-restart 100M & npm run watch", "startDev": "pm2 start ./bin/www", "stop": "pm2 stop 0" }

This error is very intermittent.

I have tried cleaning cache, deleting node_modules, package-lock.json, and reinstalling.

I have completely disabled all antivirus and firewall, including network firewalls as I have tested on 3 different networks.

Any ideas as to what is happening?

Levi Blodgett
  • 354
  • 1
  • 3
  • 16

5 Answers5

9

From what I could find it seems to be a windows access violation related error :

https://github.com/nodejs/node/blob/842e5a10ac59c826f875ef79e92d144e2655cc9a/test/common.js#L502-L505

  // On Windows, v8's base::OS::Abort triggers an access violation,
  // which corresponds to exit code 3221225477 (0xC0000005)
  if (process.platform === 'win32')
    expectedExitCodes = [3221225477];

[EDIT:] Eventually try to upgrade (node@v12.11.1 --> node@v12.13.1) to the lastest LTS version of node as it might solve your problem

MI53RE
  • 313
  • 3
  • 11
  • One of the three systems I am running it on is version 13.1.0, new install, so that is not it. I am trying to look into what you found in node.js code currently though. – Levi Blodgett Nov 20 '19 at 17:18
  • worked for me in windows after moving from 12.0.0 to 12.22.5 – Sebastian Aug 20 '21 at 02:31
5

If you run npm cache clean --force you will clear your npm cache. This could possibly remove anything in the cache that could be causing this. If you continue to have issues, I recommend you reinstall npm/node.js which should clear up any npm/node.js related issues if there are any. It could also be firewall related, although OP has said it was NOT firewall related. Double-check your firewall just in case.

I found something here which is where I had found the npm cache clean --force solution.

Tehc
  • 59
  • 3
  • 1
    I had mentioned in my question that I had cleared the cache already, and I have also tested on a completely new system with the same issue. And I tested on a system with no firewall or antivirus present, completely disabled and uninstalled. – Levi Blodgett Nov 18 '19 at 20:18
  • Old nodejs node-oracledb libs? Oracle client libs (binary) are ok? – Crutch Master Nov 19 '19 at 04:58
  • @LeviBlodgett I didn't know you had already cleared the cache. That part of the post must've either not been in your post or I simply skipped over that specific sentence. Maybe try installing an older or newer version of npm or node.js. What it looks like is happening to me is Windows (as stated by @MI53RE) is unable to access a folder or file. By the way, what is that npm module called "versioncenter" for? – Tehc Nov 21 '19 at 02:46
  • 2
    I did not need to force cache cleaning, `npm cache verify` was enough for me. – dummdidumm Jul 07 '20 at 09:27
  • Sorry about that. I made this post a while back, not knowing much about Stack Overflow. Should I delete this? – Tehc Jul 16 '22 at 17:40
2

For anyone who stumbles upon this question in the future, this is how I "fixed" it:

I used PM2 to wrap the application and auto-restart if it crashes, it doesn't stop the crashes but it reloads while keeping connection with the user so they don't notice.

It is messy but I have never found the cause of this error or how to fix it.

Levi Blodgett
  • 354
  • 1
  • 3
  • 16
  • Wow. I'm also banging my head against this. I am starting node with pm2 and without, but in any case I run into this issue if I'm starting it at boot. I couldn't figure out the solution, I'm also using pm2-windows-service and running the service as the user. If I figure this out i'll write it up here. – mcdado May 07 '20 at 18:23
  • This is not an option in case you're using some sort of worker scheduler – usersina Mar 26 '21 at 13:20
0

For me, Reinstalling a 64 bit version of Node JS Worked. That error code I looked it up and somewhere it was an error due to using a 32 bit version of it. Even though I downloaded using the x86 installer. Download with the 64 bit installer.

-2

Try Installing node.js again it worked for me and please install all the dependencies if installing node doesn't work

Yash Jain
  • 11
  • 1
  • Please try to add some step-by-step instructions and/or code-driven paradigms to your suggestion. – Evan P Aug 08 '21 at 15:29