Dealing with a wired issues for PM2 on AWS EC2!
Issue
After installed node.js and pm2 on AWS EC2, cannot run pm2!
Reason
pm2 tried to find excutable node. However, somehow nodejs is the right one instead node
Solution
- Check where is the
nodeinstalled
which node
/usr/sbin/node
- Check where is the
nodejsinstalled
which nodejs
/usr/bin/nodejs
- Remove old
node, and make a new linknodetonodejs
sudo rm /usr/sbin/node
sudo ln -s /usr/bin/nodejs /usr/sbin/node
Done!
Written on September 8, 2015
