Closed UTGuy closed 4 months ago
You have a homebrew-installed git, so it’s not quite a stock Mac laptop; you also have grep aliased, and nvm debug seems to imply that ls
doesn’t exist?
Thees definitely something weird here, but the implication is that something in your profile is causing nvm to run the wrong command (which nvm can fix once it’s identified)
I had the similar issue on Ubuntu and it turned out to be the PATH issue. Which I was able to fix by modifying bash like this: _
export PATH="$NVM_DIR/versions/node/$(nvm current)/bin:$PATH"
_ Hope that helps.
@ljharb I've uninstalled Homebrew git... I do have oh-my-zsh
installed which could interfere with the aliaes for ls
.
Couple of notes...
ls
is aliased to ls -G
through oh-my-zsh
grep
is aliased to grep=grep --color=auto --exclude-dir={.bzr,CVS,.git,.hg,.svn,.idea,.tox}
through oh-my-zsh
nvm install 20
seems to have worked but DOES NOT install npm
(it does install node
)node -v
output...
[1] 90534 killed node -v
npm -v
output...
zsh: command not found: npm
nvm debug
output...
nvm ls
output...
With ls
and grep
unaliased you get...
grep: /usr/bin/grep, grep (BSD grep, GNU compatible) 2.6.0-FreeBSD
npm comes with node, so it should be impossible to get node from nvm and not npm - but also your node -v
output is incorrect. Are you sure node
isn't aliased to something?
Either way, which npm
prints out /usr/local/bin/npm
which means you do have a (probably homebrew-installed) system version of npm. Remove that.
Operating system and version:
OSX Ventura 13.6 Apple M2
nvm debug
output:nvm ls
output:How did you install
nvm
?install script
What steps did you perform?
What happened?
What did you expect to happen?
This is a fresh install of NVM on a new laptop. I would have expected the installation of Node v20 to also install NPM properly.
Is there anything in any of your profile files that modifies the
PATH
?No