0

I have installed new version of npm in the custom directory .npm-global/bin and removed it from /usr/local/bin. The new path is declared:

PATH=/usr/local/bin:./node_modules/.bin:/Users/dmitrizaitsev/.npm-global/bin:...

and the new npm is found with which:

which npm
/Users/dmitrizaitsev/.npm-global/bin/npm

However, it still attempts to run from the old path and fails:

npm
-bash: /usr/local/bin/npm: No such file or directory

Any idea what is wrong here?

5

The old path is still cached by the shell. Either open a new tab/window or run hash -r to clear it.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .