NewbieOnRails
NewbieOnRails

Reputation: 231

npm issue on EC2 instance

I download and compiled node and npm on EC2 instance. Everything seems right (the -v are shown on both), but when I try to npm install pm2 ask for me to run the command as Root (I am), yet when I sudo npm install says sudo: npm: command not found. Any ideas? Thanks.

Upvotes: 0

Views: 1494

Answers (1)

NewbieOnRails
NewbieOnRails

Reputation: 231

This solved the issue.

sudo ln -s /usr/local/bin/node /usr/bin/node
sudo ln -s /usr/local/lib/node /usr/lib/node
sudo ln -s /usr/local/bin/npm /usr/bin/npm

Upvotes: 1

Related Questions