Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. 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
  2. Then use this command to get the latest version of node.js
    1. sudo apt-get install nodejs
    2. (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...
      1. sudo apt-cache showpkg nodejs
      2. ...then putting that in after the 'nodejs=' in sudo apt-get install nodejs (ex: sudo apt-get install nodejs=0.10.26-1chl1~precise1)
  3. 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
    1. if "npm --version" doesn't return something, see #3 at bottom of page.

       

  4. cd into your project folder and create a file called package.json ("touch package.json")

    1. 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)
      }
      }
  5. Then from the CLI again run while in your project folder

    Code Block
    $ npm install

...