...
Run these commands in order:
Code Block $ sudo apt-get install software-properties-common $ sudo apt-get install python-software-properties $ sudo apt-add-repository ppa:chris-lea/node.js $ sudo apt-get update
- Then use this command to get the latest version of node.js
- sudo apt-get install nodejs
- (If you have problems): John needed to designate a version; this shouldn't be necessary, but if you're having problems, try finding the latest version...
- sudo apt-cache showpkg nodejs
- ...then putting that in after the 'nodejs=' in sudo apt-get install nodejs (ex: sudo apt-get install nodejs=0.10.26-1chl1~precise1)
Then continue on running:
Code Block $ sudo npm -g install grunt $ sudo npm install -g grunt-cli $ sudo chown -R vagrant:vagrant /usr/lib/node_modules $ sudo chown -R vagrant:vagrant /home/vagrant/.npm
if "npm --version" doesn't return something, see #3 at bottom of page.
cd into your project folder and create a file called package.json ("touch package.json")
open with your editor (sublime), put this in there:
Code Block { "name": "THE PROJECT NAME", "version": "0.1.0", "devDependencies": { "grunt": "~0.4.4" (or whatever version is above) } }
Then from the CLI again run while in your project folder
Code Block $ npm install
...