Having vagrants having problems with npm

I am using vagrant shell to install node grunt and bower.

for some reason the tramp says:

==> default: /tmp/vagrant-shell: line 8: npm: command not found
==> default: /tmp/vagrant-shell: line 9: npm: command not found
The SSH command responded with a non-zero exit status. Vagrant

      

but when I log into the roaming ssh machine the npm command is found and I can use it just fine.

Vagrantfile:

# -*- mode: ruby -*-
# vi: set ft=ruby :
$script = <<SCRIPT
yum -y update;
yum -y groupinstall "Development Tools";
wget http://nodejs.org/dist/v0.11.9/node-v0.11.9.tar.gz -P /usr/src;
tar zxf /usr/src/node-v0.11.9.tar.gz -C /usr/src;
/usr/src/node-v0.11.9/configure;
make -C /usr/src/node-v0.11.9/;
make install -C /usr/src/node-v0.11.9/;
npm install -g grunt-cli;
npm install -g bower;
SCRIPT
Vagrant.configure(2) do |config|
   config.vm.box = "chef/centos-6.5"
   config.ssh.username = 'root'
   config.ssh.password = 'vagrant'
 # config.vm.network "public_network"
   config.vm.provision "shell",  
 inline: $script
end

      

+3
linux node.js vagrant


source to share


No one has answered this question yet

Check out similar questions:

1988
Find the version of the installed npm package
1822
What's the difference between dependencies, devDependencies and peerDependencies in the npm package.json file?
1727
Should I use Vagrant or Docker to create an isolated environment?
1688
What is the -save option for npm install?
1544
How can I upgrade NodeJS and NPM to the next versions?
1205
npm throws error without sudo
109
NPM modules won't install globally without sudo
6
Can't install NPM on Vagrant during provisioning
five
How to provision software with Vagrant without sudo
2
Installing NodeJS with a broken Vagrant wrapper engine



All Articles
Loading...
X
Show
Funny
Dev
Pics