npm
looks for node_modules
in the current directory, and all its parent directories, then looks in the global location. My current proposed dir structure is:
- global
- package.json
- node_modules/
- project-1
- gulpfile.coffee
- project-2
- gulpfile.coffee
But this isn't where npm
normally looks for this. Is there an environment variable I can set to deal with this, or a way I can tell it to look in a specific directory? Thanks!
Try the following to set NODE_PATH in gulp.
A full example would look like the following.
The above 2 examples add to the node path if it is set. If you want to just set it do the following.
There is a
NODE_PATH
environment variable you can set.