Every single time I try to use npm
in zsh
it asks me if I meant nm
. It's gotten very annoying now. I like the auto correct feature, though. How can I turn it off for the npm
command?
2 Answers
If you've just installed npm
and you're still running a zsh instance from before the installation, run hash -rf
to rebuild the command cache (or more precisely hash npm
). Instances of zsh started after the installation will pick up this command when they build their cache.
You could put:
alias npm='nocorrect npm'
in your profile script. Not very pretty but effective.
npm
was a valid command. Why doesn't it think that it's a valid command? Is this an installed executable in your$PATH
? Do you have execution permissions on it?