New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
npm requires node v0.2.3 or higher #3211
Comments
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 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:
_ |
@ljharb I've uninstalled Homebrew git... I do have Couple of notes...
[1] 90534 killed node -v
zsh: command not found: npm
nvm --version: v0.39.5
$TERM_PROGRAM: Apple_Terminal
$SHELL: /bin/zsh
$SHLVL: 1
whoami: 'mlwalters'
${HOME}: /Users/mlwalters
${NVM_DIR}: '${HOME}/.nvm'
${PATH}: ${NVM_DIR}/versions/node/v20.8.0/bin:/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin
$PREFIX: ''
${NPM_CONFIG_PREFIX}: ''
$NVM_NODEJS_ORG_MIRROR: ''
$NVM_IOJS_ORG_MIRROR: ''
shell version: 'zsh 5.9 (x86_64-apple-darwin22.0)'
uname -a: 'Darwin 22.6.0 Darwin Kernel Version 22.6.0: Fri Sep 15 13:39:54 PDT 2023; root:xnu-8796.141.3.700.8~1/RELEASE_ARM64_T8112 arm64'
checksum binary: 'shasum'
OS version: macOS 13.6 22G120
awk: /usr/bin/awk, awk version 20200816
curl: /usr/bin/curl, curl 8.1.2 (x86_64-apple-darwin22.0) libcurl/8.1.2 (SecureTransport) LibreSSL/3.3.6 zlib/1.2.11 nghttp2/1.51.0
wget: not found
sed: /usr/bin/sed
cut: /usr/bin/cut
basename: /usr/bin/basename
rm: /bin/rm
mkdir: /bin/mkdir
xargs: /usr/bin/xargs
git: /usr/bin/git, git version 2.39.3 (Apple Git-145)
ls: grep:: No such file or directory
grep: grep: aliased to grep --color=auto --exclude-dir={.bzr,CVS,.git,.hg,.svn,.idea,.tox} (grep --color=auto --exclude-dir={.bzr,CVS,.git,.hg,.svn,.idea,.tox}), grep (BSD grep, GNU compatible) 2.6.0-FreeBSD
nvm current: none
which node: ${NVM_DIR}/versions/node/v20.8.0/bin/node
which iojs: iojs not found
which npm: /usr/local/bin/npm
npm config get prefix:
npm root -g:
v20.8.0
default -> 20 (-> v20.8.0)
iojs -> N/A (default)
unstable -> N/A (default)
node -> stable (-> v20.8.0) (default)
stable -> 20.8 (-> v20.8.0) (default)
lts/* -> lts/hydrogen (-> N/A)
lts/argon -> v4.9.1 (-> N/A)
lts/boron -> v6.17.1 (-> N/A)
lts/carbon -> v8.17.0 (-> N/A)
lts/dubnium -> v10.24.1 (-> N/A)
lts/erbium -> v12.22.12 (-> N/A)
lts/fermium -> v14.21.3 (-> N/A)
lts/gallium -> v16.20.2 (-> N/A)
lts/hydrogen -> v18.18.0 (-> N/A) With 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 Either way, |
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
The text was updated successfully, but these errors were encountered: