diff --git a/vagrant_scripts/install.sh b/vagrant_scripts/install.sh index 6bb6e8142e..50c8a75903 100755 --- a/vagrant_scripts/install.sh +++ b/vagrant_scripts/install.sh @@ -1,19 +1,24 @@ #!/bin/bash echo Installing nvm... -curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.30.1/install.sh | bash -source ~/.profile +curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.30.1/install.sh | NVM_DIR="/home/vagrant/.nvm" PROFILE="/home/vagrant/.profile" bash +echo "source /home/vagrant/.nvm/nvm.sh" >> /home/vagrant/.profile +echo "nvm install" >> /home/vagrant/.profile + +chown -R vagrant:vagrant /home/vagrant/.nvm + +source /home/vagrant/.profile echo Setting up node... +cd /vagrant nvm install nvm use nvm alias default current echo Update npm... -npm install -g npm +npm install -g npm@2 echo Installing global modules... -npm install -g gulp bower grunt-cli +npm install -g gulp bower grunt-cli mocha -echo Installing Habitica... -npm install --no-bin-links +npm i diff --git a/vagrant_scripts/vagrant.sh b/vagrant_scripts/vagrant.sh index 5711b796f0..d732cf8689 100644 --- a/vagrant_scripts/vagrant.sh +++ b/vagrant_scripts/vagrant.sh @@ -95,6 +95,8 @@ rm firefox.deb echo Installing ntp... apt-get install -qq ntp +/vagrant/vagrant_scripts/install.sh + ## # echo Seeding Mongodb... ## node ./src/seed.js ## no longer required - see comments in src/seed.js