I use nvm to mange my node versions, one is v6.10.1, one is v7.7.4. In normal times, PM2 works normally when I use the fork mode of PM2. Today, when I want to use the cluster mode of PM2, a bug occurred that I can not fix.
/root/.nvm/versions/node/v6.10.1/bin/node: bad option: --harmony-async-await
But I have told nvm to use v7.7.4 before pm2 start process.json and I defined '/root/.nvm/versions/node/v7.7.4/bin/node' for 'interpreter' in the process file of pm2.
"interpreter": "/root/.nvm/versions/node/v7.7.4/bin/node",
"node_args" : "--harmony-async-await",
So, why it happened? I need someone to help me. Tanks!
via 阚巍巍
No comments:
Post a Comment