sudo npm install command not found
20,208
Correct npm path is /usr/local/bin/npm
else just run below command again
sudo apt-get install npm
And verify the npm is install, Alternatively you can try:
sudo ln -s /usr/local/lib/node /usr/lib/node
sudo ln -s /usr/local/bin/npm /usr/bin/npm
Author by
Jabaa
Updated on April 28, 2021Comments
-
Jabaa about 3 years
I have installed
nodejs
andnpm
in my server (os:amazon ami) using node version manager current node version is7.10.0
npm version is4.2.0
nodejs project is located in
var/www/testing
folder when i am trying to install the depeondeies present in package.json usingsudo npm install
i got command not found errorPath of
node
andnpm
is respectively~/.nvm/versions/node/v7.10.0/bin/node ~/.nvm/versions/node/v7.10.0/bin/npm
npm and node are in same folder but when I try this command:
sudo npm install
I gotsudo: npm: command not found
npm install
command throws no errors butnode_modules
folder is empty. -
Serve almost 7 yearsWhich os you are using ? Reinstall it as global
-
Jabaa almost 7 yearsAmazone linux ami
-
Serve almost 7 yearsFor amazon linux AMI just use these commands again git clone github.com/isaacs/npm.git cd npm sudo make install