Closed donaldpipowitch closed 9 years ago
Sorry, but... help? None of the problems from your link seem to match my question?
Try changing the order in $PATH
so that .npm-packages
takes precedence over the other one.
Ok, thanks.
@donaldpipowitch, did you find a solution?
I don't know, I'm not that good at bash... You said "Try changing the order in $PATH so that .npm-packages takes precedence over the other one.", but isn't that what the guide already does at step 5: "PATH="$NPM_PACKAGES/bin:$PATH"
"? But using which npm
returns /usr/local/bin/npm
.
Try setting PATH=$PATH:$NPM_PACKAGES/bin
.
Strange. It looks like it is the same behavior. Nothing has changed.
I followed your guide "Install npm packages globally without sudo on OS X and Linux" on Mac which works perfectly. If I install something like
$ npm i -g babel
I can now use thebabel
command. However I tried updating npm itself with$ npm i -g npm
, but I still use the old sudo-ed version of npm, not the version inside.npm-packages
. Is there a nice way to use the not-sudo-installed npm version and fallback to the sudo-installed npm version, if necessary?