Install Sage, NPM, Bower & Glup on Ubuntu

I’ve updated these instructions to handle some issues syncing NPM with Sage on Ubuntu 14. Sage has become one of the preferred starter themes used by an industry leading WordPress development company. I don’t know how long these specific instructions will work for, but right now they get the job done. Recently I ran into some trouble installing NPM on Sage, here’s the process I followed to successfully get up and running.

  1. Install Sage
    1. git clone sage and rename your new theme accordingly
  2. Install NPM globally
    1. curl -sL | sudo bash
    2. sudo apt-get install -y nodejs
    3. apt-get install -y build-essential
    4. sudo npm install -g n
    5. sudo n stable
      1. The “sudo n stable” is important. Type in the first command, it looks like it finishes something, then do the n stable, and it actually completes the install properly.
    6. FixNPMpermissioning
      1. mkdir ~/npm-global
      2. npm config set prefix ‘~/npm-global’export PATH=~/npm-global/bin:$PATH
      3. source ~/.profile
      4. sudo npm cache clean
    7. Install Gulp and BowergloballyusingNPM
      1. sudo npm install -g gulp bower
    8. RunNPM install from the theme directory
      1. cd /var/www/bedrock/web/app/themes/sage
      2. npm install
        1. If you have a throw err, manually install the npm dependency
        2. In my last install here’s what I did:
          1. npm install –save-dev browser-sync
      3. bower install
      4. gulp


If you have any questions or feedback about these instructions please leave a comment.