Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

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.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
382 views
Welcome To Ask or Share your Answers For Others

1 Answer

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share

548k questions

547k answers

4 comments

86.3k users

...