opkcookie.blogg.se

Npm config set prefix
Npm config set prefix









npm config set prefix

My personal workflow is now to use the installer obtained from to install node on systems. I think what I will do is manually build out symlinks inside /usr/local/bin for any programs that I have trouble with and it should be good enough for my purposes.ĮDIT: I'm updating this in 2019, because this old question is popular but now outdated both in terms of my personal workflow and also in terms of how to best go about installing node and managing its various dependencies. I guess in this particular instance it's just a matter of the npm install -g not making the right symlinks in a "proper" location (like /usr/local/bin maybe). It seems like this isn't the right way to do it because if I install something else later (using Homebrew or something) I'll be needing to append it to my zsh startup script to set the path. Where might I be able to find that?Ģ) Should I do this? (Append :/usr/local/share/npm/bin to the exported $PATH at the bottom of my ~/.zshrc) usr/local/share/npm/bin/jslint -> /usr/local/share/npm/lib/node_modules/jslintĭue to /usr/local/share/npm/bin not being in my $PATH.ġ) Why did brew not install global npm bin path to path? Maybe it did, but something zsh does is messing it up.

npm config set prefix

Now that I want to run jslint.js on the command-line as the command jslint I find that the canonical way to accomplish this is sudo npm install -g jslint which ran successfully with this output: $ sudo npm install -g jslint I am on a Mac and have installed node.js through brew install node. I am being more cautious than usual because I have been confused by the behavior of npm in the past.











Npm config set prefix