How can I install npm inside Debian vagrant box? I try this, but it's not wotking.
vagrant@packer-debian-7:~$
sudo apt-get install nodejs
Reading package lists... Done
Building dependency tree
Reading state information... Done
nodejs is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 82 not upgraded.
vagrant@packer-debian-7:~$nodejs -v
v0.10.29
vagrant@packer-debian-7:~$sudo apt-get install npm
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package npm
vagrant@packer-debian-7:~$npm -v
-bash: npm: command not found
My host OS is Ubuntu
The debian way would be to add the repo and install with apt-get
curl --silent --location https://deb.nodesource.com/setup_0.12 | sudo bash -
sudo apt-get update
sudo apt-get install --yes nodejs
That will install nodejs and npm the debian way
Here you have a vagrant provision i build that comes with nodejs https://github.com/Sudakatux/vagrant-liferay-others
run command :
wget https://npmjs.org/install.sh
sudo chmod +x install.sh
sudo ./install.sh
it will install npm to your vagrant box.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With