Alex Dai Playground

[pm2] In-memory PM2 is out-of-date

| Comments

問題

>>>> In-memory PM2 is out-of-date, do:
>>>> $ pm2 update
In memory PM2 version: 2.4.6
Local PM2 version: 2.7.2
-------------------------------------------------------
因為 nvm 有舊版 node 安裝 pm2 的關係,只要移除舊版就可以 
nvm use old-version
npm uninstall -g pm2
nvm use new-vsersion
npm i -g pm2

方法1

pm2 kill
npm uninstall pm2 -g
npm install pm2@latest -g

方法2

pm2 kill
npm remove pm2 -g
which pm2 (/usr/bin/pm2)
rm (directory from call above)
npm install pm2@latest -g
ln -s /usr/local/bin/pm2 /usr/bin/pm2

  • nvm: /usr/local/bin/pm2 換成 /root/.nvm/versions/node/v8.7.0/bin/pm2

https://github.com/Unitech/pm2/issues/3175

Comments

comments powered by Disqus