My ROS logs an error like this. im running my ROS using pm2 and when i run 'pm2 logs' it does not logs any errors that could cause the ROS to stop and restart, but it restarts.
Thus, i go to /home/ubuntu/.npm/_logs/... folder to see if there are some errors logged and this is what ive seen.
0 info it worked if it ends with ok
1 verbose cli [ '/home/ubuntu/.nvm/versions/node/v8.10.0/bin/node',
1 verbose cli '/home/ubuntu/.nvm/versions/node/v8.10.0/lib/node_modules/pm2/lib/ProcessContainerFork.js',
1 verbose cli 'start' ]
2 info using npm@5.7.1
3 info using node@v8.10.0
4 verbose run-script [ 'prestart', 'start', 'poststart' ]
5 info lifecycle my-ros-app@1.0.0~prestart: my-ros-app@1.0.0
6 info lifecycle my-ros-app@1.0.0~start: my-ros-app@1.0.0
7 verbose lifecycle my-ros-app@1.0.0~start: unsafe-perm in lifecycle true
8 verbose lifecycle my-ros-app@1.0.0~start: PATH: /home/ubuntu/.nvm/versions/node/v8.10.0/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/home/ubuntu/xeleqt-realm-object-server/node_modules/.bin:/home/ubuntu/.nvm/versions/node/v8.10.0/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/usr/lib/jvm/java-8-oracle/bin:/usr/lib/jvm/java-8-oracle/db/bin:/usr/lib/jvm/java-8-oracle/jre/bin:/usr/lib/jvm/java-8-oracle/bin:/usr/lib/jvm/java-8-oracle/db/bin:/usr/lib/jvm/java-8-oracle/jre/bin
9 verbose lifecycle my-ros-app@1.0.0~start: CWD: /home/ubuntu/xeleqt-realm-object-server
10 silly lifecycle my-ros-app@1.0.0~start: Args: [ '-c', 'npm run build && node dist/index.js' ]
11 silly lifecycle my-ros-app@1.0.0~start: Returned: code: 137 signal: null
12 info lifecycle my-ros-app@1.0.0~start: Failed to exec start script
13 verbose stack Error: my-ros-app@1.0.0 start: npm run build && node dist/index.js
13 verbose stack Exit status 137
13 verbose stack at EventEmitter. (/home/ubuntu/.nvm/versions/node/v8.10.0/lib/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. (/home/ubuntu/.nvm/versions/node/v8.10.0/lib/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 my-ros-app@1.0.0
15 verbose cwd /home/ubuntu/xeleqt-realm-object-server
16 verbose Linux 3.13.0-44-generic
17 verbose argv "/home/ubuntu/.nvm/versions/node/v8.10.0/bin/node" "/home/ubuntu/.nvm/versions/node/v8.10.0/lib/node_modules/pm2/lib/ProcessContainerFork.js" "start"
18 verbose node v8.10.0
19 verbose npm v5.7.1
20 error code ELIFECYCLE
21 error errno 137
22 error my-ros-app@1.0.0 start: npm run build && node dist/index.js
22 error Exit status 137
23 error Failed at the my-ros-app@1.0.0 start script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 137, true ]
My ROS logs an error like this. im running my ROS using pm2 and when i run 'pm2 logs' it does not logs any errors that could cause the ROS to stop and restart, but it restarts.
Thus, i go to /home/ubuntu/.npm/_logs/... folder to see if there are some errors logged and this is what ive seen.
0 info it worked if it ends with ok 1 verbose cli [ '/home/ubuntu/.nvm/versions/node/v8.10.0/bin/node', 1 verbose cli '/home/ubuntu/.nvm/versions/node/v8.10.0/lib/node_modules/pm2/lib/ProcessContainerFork.js', 1 verbose cli 'start' ] 2 info using npm@5.7.1 3 info using node@v8.10.0 4 verbose run-script [ 'prestart', 'start', 'poststart' ] 5 info lifecycle my-ros-app@1.0.0~prestart: my-ros-app@1.0.0 6 info lifecycle my-ros-app@1.0.0~start: my-ros-app@1.0.0 7 verbose lifecycle my-ros-app@1.0.0~start: unsafe-perm in lifecycle true 8 verbose lifecycle my-ros-app@1.0.0~start: PATH: /home/ubuntu/.nvm/versions/node/v8.10.0/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/home/ubuntu/xeleqt-realm-object-server/node_modules/.bin:/home/ubuntu/.nvm/versions/node/v8.10.0/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/usr/lib/jvm/java-8-oracle/bin:/usr/lib/jvm/java-8-oracle/db/bin:/usr/lib/jvm/java-8-oracle/jre/bin:/usr/lib/jvm/java-8-oracle/bin:/usr/lib/jvm/java-8-oracle/db/bin:/usr/lib/jvm/java-8-oracle/jre/bin 9 verbose lifecycle my-ros-app@1.0.0~start: CWD: /home/ubuntu/xeleqt-realm-object-server 10 silly lifecycle my-ros-app@1.0.0~start: Args: [ '-c', 'npm run build && node dist/index.js' ] 11 silly lifecycle my-ros-app@1.0.0~start: Returned: code: 137 signal: null 12 info lifecycle my-ros-app@1.0.0~start: Failed to exec start script 13 verbose stack Error: my-ros-app@1.0.0 start: (/home/ubuntu/.nvm/versions/node/v8.10.0/lib/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. (/home/ubuntu/.nvm/versions/node/v8.10.0/lib/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 my-ros-app@1.0.0
15 verbose cwd /home/ubuntu/xeleqt-realm-object-server
16 verbose Linux 3.13.0-44-generic
17 verbose argv "/home/ubuntu/.nvm/versions/node/v8.10.0/bin/node" "/home/ubuntu/.nvm/versions/node/v8.10.0/lib/node_modules/pm2/lib/ProcessContainerFork.js" "start"
18 verbose node v8.10.0
19 verbose npm v5.7.1
20 error code ELIFECYCLE
21 error errno 137
22 error my-ros-app@1.0.0 start:
npm run build && node dist/index.js
13 verbose stack Exit status 137 13 verbose stack at EventEmitter.npm run build && node dist/index.js
22 error Exit status 137 23 error Failed at the my-ros-app@1.0.0 start script. 23 error This is probably not a problem with npm. There is likely additional logging output above. 24 verbose exit [ 137, true ]Why is this happening?