Unitech / pm2-deploy

Deploy part of PM2
http://pm2.keymetrics.io/docs/usage/deployment/
MIT License
178 stars 71 forks source link

restarting with pm2 deploy in post-deploy causes error #125

Closed cryptiklemur closed 4 years ago

cryptiklemur commented 7 years ago

Getting a weird error, only when i restart the script using post-deploy

pm2 startOrRestart ecosystem.json --env production

0|LFGBot   | SyntaxError: Unexpected token =
0|LFGBot   |     at exports.runInThisContext (vm.js:53:16)
0|LFGBot   |     at Module._compile (module.js:387:25)
0|LFGBot   |     at Object.Module._extensions..js (module.js:422:10)
0|LFGBot   |     at Module.load (module.js:357:32)
0|LFGBot   |     at Function.Module._load (module.js:314:12)
0|LFGBot   |     at Function._load (/usr/local/share/.config/yarn/global/node_modules/pmx/lib/transaction.js:92:21)
0|LFGBot   |     at Object.<anonymous> (/usr/local/share/.config/yarn/global/node_modules/pm2/lib/ProcessContainerFork.js:53:21)
0|LFGBot   |     at Module._compile (module.js:413:34)
0|LFGBot   |     at Object.Module._extensions..js (module.js:422:10)
0|LFGBot   |     at Module.load (module.js:357:32)
vmarchaud commented 7 years ago

Platform ? PM2/Node version ? This seems to be related to your application

cryptiklemur commented 7 years ago

image

Running pm2 startOrRestart ecosystem.json --env production on the server itself, as the user, works fine.