Last Updated: September 09, 2019
·
3.452K
· reiaguilera

Instalation Mean stack (MongoDB, Express, Angular, Node.JS) on Vagrant

Implementation on vagrant
Ready...Go!

# setup vagrant
vagrant init precise32 http://files.vagrantup.com/precise32.box
vagrant up
vagrant ssh

#install node
sudo apt-get update
sudo apt-get install python-software-properties  
sudo add-apt-repository ppa:chris-lea/node.js  
sudo apt-get update  
sudo apt-get install nodejs

#install yeoman
sudo npm install -g yo grunt-cli bower 

#install generator
sudo npm install generator-generator -g
sudo npm install generator-mean -g

#create project
mkdir myProject
cd myProject

yo mean

#launch server
grunt server

End run!!!
enjoy

2 Responses
Add your response

Hi. Thanks for the instructions. I am using OS X Mavericks with VirtualBox 4.3.16 and Vagrant 1.6.5. Everything installed correctly except when I try to create the project. Two problems I found. Git was missing, so I ran sudo apt-get install git. This allowed "bower install" to run. Running "npm install" gives an error:

vagrant@precise32:~/myProject$ npm install
npm WARN package.json myapp@0.0.1 No README data
npm WARN deprecated static-favicon@2.0.0-alpha: use serve-favicon module
npm ERR! Error: EACCES, mkdir '/home/vagrant/.npm/underscore/1.7.0'
npm ERR! { [Error: EACCES, mkdir '/home/vagrant/.npm/underscore/1.7.0']
npm ERR! errno: 3,
npm ERR! code: 'EACCES',
npm ERR! path: '/home/vagrant/.npm/underscore/1.7.0',
npm ERR! parent: 'myapp' }
npm ERR!
npm ERR! Please try running this command again as root/Administrator.

npm ERR! System Linux 3.2.0-23-generic-pae
npm ERR! command "/usr/bin/node" "/usr/bin/npm" "install"
npm ERR! cwd /home/vagrant/myProject
npm ERR! node -v v0.10.32
npm ERR! npm -v 1.4.28
npm ERR! path /home/vagrant/.npm/underscore/1.7.0
npm ERR! code EACCES
npm ERR! errno 3
npm ERR! stack Error: EACCES, mkdir '/home/vagrant/.npm/underscore/1.7.0'
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /home/vagrant/myProject/npm-debug.log
npm ERR! not ok code 0
vagrant@precise32:~/myProject$

over 1 year ago ·

$ grunt server
Warning: Task "server" not found. Used --force, continuing.

Done, but with warnings

over 1 year ago ·