You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
root@envision-7d22e90d1977:~# PM2_HOME=/etc/pm2 pm2 install myModule
[PM2][Module] Installing module myModule
[PM2][Module] Module already installed. Updating.
rm: could not remove directory (code ENOTEMPTY): /etc/pm2/modules/myModule/node_modules/electron/dist
rm: could not remove directory (code ENOTEMPTY): /etc/pm2/modules/myModule/node_modules/electron
rm: could not remove directory (code ENOTEMPTY): /etc/pm2/modules/myModule/node_modules
rm: could not remove directory (code ENOTEMPTY): /etc/pm2/modules/myModule
[PM2][Module] Calling [NPM] to install myModule ...
npm ERR! Unexpected end of JSON input while parsing near '..."integrity":"sha512-H'
npm ERR! A complete log of this run can be found in:
npm ERR! /home/root/.npm/_logs/2018-05-16T13_53_28_798Z-debug.log
[PM2][Module] [[[[[ Module installation failure! ]]]]]
[PM2][Module] [RESTORING TO PREVIOUS VERSION]
rm: could not remove directory (code ENOTEMPTY): /etc/pm2/modules/myModule/node_modules/electron/dist
rm: could not remove directory (code ENOTEMPTY): /etc/pm2/modules/myModule/node_modules/electron
rm: could not remove directory (code ENOTEMPTY): /etc/pm2/modules/myModule/node_modules
rm: could not remove directory (code ENOTEMPTY): /etc/pm2/modules/myModule
module.js:540
throw err;
^
Error: Cannot find module '/etc/pm2/modules/myModule/node_modules/myModule/package.json'
at Function.Module._resolveFilename (module.js:538:15)
at Function.Module._load (module.js:468:25)
at Module.require (module.js:587:17)
at require (/usr/lib/node_modules/pm2/node_modules/v8-compile-cache/v8-compile-cache.js:159:20)
at startModule (/usr/lib/node_modules/pm2/lib/API/Modules/Modularizer.js:268:22)
at /usr/lib/node_modules/pm2/lib/API/Modules/Modularizer.js:406:7
at /usr/lib/node_modules/pm2/lib/API/Modules/Modules.js:184:16
at /usr/lib/node_modules/pm2/lib/Client.js:648:12
at /usr/lib/node_modules/pm2/node_modules/pm2-axon-rpc/lib/client.js:45:10
at Parser.<anonymous> (/usr/lib/node_modules/pm2/node_modules/pm2-axon/lib/sockets/req.js:67:8)
root@envision-7d22e90d1977:~# cat /etc/pm2/pm2.log
2018-05-16 06:21:04: ===============================================================================
2018-05-16 06:21:04: --- New PM2 Daemon started ----------------------------------------------------
2018-05-16 06:21:04: Time : Wed May 16 2018 06:21:04 GMT+0000 (UTC)
2018-05-16 06:21:04: PM2 version : 2.9.2-next
2018-05-16 06:21:04: Node.js version : 8.9.4
2018-05-16 06:21:04: Current arch : x64
2018-05-16 06:21:04: PM2 home : /etc/pm2
2018-05-16 06:21:04: PM2 PID file : /etc/pm2/pm2.pid
2018-05-16 06:21:04: RPC socket file : /etc/pm2/rpc.sock
2018-05-16 06:21:04: BUS socket file : /etc/pm2/pub.sock
2018-05-16 06:21:04: Application log path : /etc/pm2/logs
2018-05-16 06:21:04: Process dump file : /etc/pm2/dump.pm2
2018-05-16 06:21:04: Concurrent actions : 2
2018-05-16 06:21:04: SIGTERM timeout : 1600
2018-05-16 06:21:04: ===============================================================================
2018-05-16 06:21:08: Starting execution sequence in -fork mode- for app name:myModule id:0
2018-05-16 06:21:08: App name:myModule id:0 online
2018-05-16 06:21:09: Error while getting CLK_TCK { Error: Command failed: getconf CLK_TCK
/bin/sh: getconf: command not found
at ChildProcess.exithandler (child_process.js:275:12)
at emitTwo (events.js:126:13)
at ChildProcess.emit (events.js:214:7)
at maybeClose (internal/child_process.js:925:16)
at Socket.stream.socket.on (internal/child_process.js:346:11)
at emitOne (events.js:116:13)
at Socket.emit (events.js:211:7)
at Pipe._handle.close [as _onclose] (net.js:554:12) killed: false, code: 127, signal: null, cmd: 'getconf CLK_TCK' }
2018-05-16 06:21:09: Error while getting PAGESIZE { Error: Command failed: getconf PAGESIZE
/bin/sh: getconf: command not found
at ChildProcess.exithandler (child_process.js:275:12)
at emitTwo (events.js:126:13)
at ChildProcess.emit (events.js:214:7)
at maybeClose (internal/child_process.js:925:16)
at Socket.stream.socket.on (internal/child_process.js:346:11)
at emitOne (events.js:116:13)
at Socket.emit (events.js:211:7)
at Pipe._handle.close [as _onclose] (net.js:554:12)
killed: false,
code: 127,
signal: null,
cmd: 'getconf PAGESIZE' }
2018-05-16 13:31:30: Stopping app:myModule id:0
2018-05-16 13:31:30: App [myModule] with id [0] and pid [513], exited with code [1] via signal [SIGINT]
2018-05-16 13:31:30: pid=513 msg=process killed
and PM2 safe mode doesn't work as expected
Solution?
Correct safe mode to ignore ENOTEMPTY when install fail?
Make npm cache clean --force with manual install solved the problem
The text was updated successfully, but these errors were encountered:
What's going wrong?
Safe install module doesn't work if file is used
How could we reproduce this issue?
pm2 install myModule
when NPM servers are brokenhttps://status.npmjs.org/incidents/rmv88ktdgkkr
Supporting information
If NPM servers crash, we lost the module
and PM2 safe mode doesn't work as expected
Solution?
npm cache clean --force
with manual install solved the problemThe text was updated successfully, but these errors were encountered: