manas
manas

Reputation: 6400

pm2 installation results in error

I want to install pm2 globally to run my nodejs app. my os is ubuntu 14.04 64bit and node version 0.10.33.

when i run the command npm install pm2 -g it gives the following error

npm ERR! [email protected] preinstall: `bash ./scripts/preinstall.sh`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] preinstall script.
npm ERR! This is most likely a problem with the pm2 package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     bash ./scripts/preinstall.sh
npm ERR! You can get their info via:
npm ERR!     npm owner ls pm2
npm ERR! There is likely additional logging output above.
npm ERR! System Linux 3.13.0-36-generic
npm ERR! command "/usr/local/bin/node" "/usr/local/bin/npm" "install" "pm2" "-g"
npm ERR! cwd /home/ubuntu
npm ERR! node -v v0.10.33
npm ERR! npm -v 1.4.28
npm ERR! code ELIFECYCLE
npm ERR! not ok code 0
ubuntu@ip-172-31-40-58:~$ 

Upvotes: 1

Views: 5418

Answers (1)

zoram
zoram

Reputation: 512

Try adding sudo

sudo npm install pm2 -g

or

sudo npm install pm2 -g --unsafe-perm

Upvotes: 3

Related Questions