NPM Global As Reference of NPM Local

How to refer NPM Local to NPM Global? If you don’t want to install the packages locally because it’s wasting hardisk space you can use the packages which have globally installed.

For example, you install the sass package globally:

$ sudo npm install -g grunt-contrib-sass

You don’t want to do the same for your project, project, and another project because you think the files are the same but just the locations which make it different.

So, in case we want to install sass package from global to local we can use link directive in your project folder:

$ npm link grunt-contrib-sass

It will automatically create node_modules/grunt-contrib-sass link to grunt-contrib-sass global package. Piece of cake.

Installing Node.js, NPM, Grunt, and Yeoman in Ubuntu 14.04 LTS

Installing Node.js is not as difficult as a year ago. You can simply install it through your Terminal. First get the installer.

$ curl -sL https://deb.nodesource.com/setup | sudo bash -

And then install it with apt-get.

$ sudo apt-get install -y nodejs

Continue reading Installing Node.js, NPM, Grunt, and Yeoman in Ubuntu 14.04 LTS