Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Skip local installation of Gulp

Tags:

node.js

npm

gulp

Can I somehow skip local installation of Gulp to the project?

I installed Gulp globally, added it to package.json as a dependency. But still Gulp wants to be installed locally also with the Local gulp not found in ... message. If I do local install, Gulp is copied into my project by node.

Is there a way to skip local installation of Gulp? I want to be able to run it across the whole server from command line and manage it installation globally.

like image 297
Vladislav Rastrusny Avatar asked Aug 18 '14 12:08

Vladislav Rastrusny


Video Answer


1 Answers

One clean way to do this is without have it locally is to install gulp globally like as you did and then run in your directory the command :

npm link gulp

It will create a symbolic link in your node_modules folder to your global gulp install. You need to be careful on the versions since all your symlinks and therefore your local project(s) will use the global one, no matter of the defined version in the package.json, which could cause errors on a deployed environment.

This is also applicable for every node package, and allow you to update the local install you've created that way of multiple projects at once.

like image 87
Preview Avatar answered Oct 02 '22 03:10

Preview