before using nodev6.x, to upgrade version 8 today, because window directly overrides the installation, there are the following problems:
it is normal for pm2,forever, to start the npm start, application for the first time, such as pm2,forever, does not install a daemon. If you close the terminal and start npm start again, the error will be as follows:
> app@0.0.0 start C:\Users\Administrator\
> node ./bin/www
2402000
Port 3000 is already in use
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! app@0.0.0 start: `node ./bin/www`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the app@0.0.0 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\Administrator\AppData\Roaming\npm-cache\_logs\2018-08-16T03_20_58_752Z-debug.log
Program exited with status code of 1.undefined
the application does not shut down properly, and every time it kills the process and starts again. May I ask what caused it?
log:
0 info it worked if it ends with ok
1 verbose cli [ "D:\\Program Files\\node\\node.exe",
1 verbose cli "D:\\Program Files\\node\\node_modules\\npm\\bin\\npm-cli.js",
1 verbose cli "start" ]
2 info using npm@5.6.0
3 info using node@v8.11.3
4 verbose run-script [ "prestart", "start", "poststart" ]
5 info lifecycle app@0.0.0~prestart: app@0.0.0
6 info lifecycle app@0.0.0~start: app@0.0.0
7 verbose lifecycle app@0.0.0~start: unsafe-perm in lifecycle true
8 verbose lifecycle app@0.0.0~start: PATH: D:\Program Files\node\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin;C:\Users\Administrator\Desktop\ubuntu\app\node_modules\.bin;D:\Program Files\node\;D:\Program Files\brackets\command;D:\Program Files\node.js;C:\Users\Administrator\AppData\Roaming\npm
9 verbose lifecycle app@0.0.0~start: CWD: C:\Users\Administrator\Desktop\ubuntu\app
10 silly lifecycle app@0.0.0~start: Args: [ "/d /s /c", "node ./bin/www" ]
11 silly lifecycle app@0.0.0~start: Returned: code: 1 signal: null
12 info lifecycle app@0.0.0~start: Failed to exec start script
13 verbose stack Error: app@0.0.0 start: `node ./bin/www`
13 verbose stack Exit status 1
13 verbose stack at EventEmitter.<anonymous> (D:\Program Files\node\node_modules\npm\node_modules\npm-lifecycle\index.js:285:16)
13 verbose stack at emitTwo (events.js:126:13)
13 verbose stack at EventEmitter.emit (events.js:214:7)
13 verbose stack at ChildProcess.<anonymous> (D:\Program Files\node\node_modules\npm\node_modules\npm-lifecycle\lib\spawn.js:55:14)
13 verbose stack at emitTwo (events.js:126:13)
13 verbose stack at ChildProcess.emit (events.js:214:7)
13 verbose stack at maybeClose (internal/child_process.js:925:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)
14 verbose pkgid app@0.0.0
15 verbose cwd C:\Users\Administrator\Desktop\ubuntu\app
16 verbose Windows_NT 6.2.9200
17 verbose argv "D:\\Program Files\\node\\node.exe" "D:\\Program Files\\node\\node_modules\\npm\\bin\\npm-cli.js" "start"
18 verbose node v8.11.3
19 verbose npm v5.6.0
20 error code ELIFECYCLE
21 error errno 1
22 error app@0.0.0 start: `node ./bin/www`
22 error Exit status 1
23 error Failed at the app@0.0.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 ]