I've been installing several Node.js modules/apps lately to be able to start a new web project. I use NPM for installing the modules, but every time I face the same problem: The modules are not accessible globally.
Not in one installation manual have I read anything about the need of changing/adding to the .bash_profile, but I have through some tutorials found out this is needed.
I have managed to get some modules working this way but not everyone, and I really could use some help here. The last one installed that I have problems with is Expresso. What shall I type in .bash_profile to be able to access it globally?
The executable Expresso file is in the following folder: /Users/toby/node/imapp/imagebridge/node_modules/expresso/bin/expresso
The following doesn't work:
export PATH="/Users/toby/node/imapp/imagebridge/node_modules/expresso/bin/expresso/:$PATH"
remove espresso from your path, eg
export PATH="/Users/toby/node/imapp/imagebridge/node_modules/expresso/bin/:$PATH"
since espresso is most likely the executable. The path is a list of directories to search for executables, not a list of executables.
Also this one is good addition for bundled modules:
export PATH=./node_modules/.bin:$PATH
It allows you to run binaries from current working dir's node_modules
subdir