nvm
nvm copied to clipboard
Nvm install fails with version 14.17.1
Operating system and version: MacOS 12.0
nvm debug output:
nvm --version: v0.39.0
$TERM_PROGRAM: Apple_Terminal
$SHELL: /bin/zsh
$SHLVL: 1
whoami: 'ryan'
${HOME}: /Users/ryan
${NVM_DIR}: '${HOME}/.nvm'
${PATH}: ${NVM_DIR}/versions/node/v16.3.0/bin:/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin
$PREFIX: ''
${NPM_CONFIG_PREFIX}: ''
$NVM_NODEJS_ORG_MIRROR: ''
$NVM_IOJS_ORG_MIRROR: ''
shell version: 'zsh 5.8 (x86_64-apple-darwin21.0)'
uname -a: 'Darwin 21.0.1 Darwin Kernel Version 21.0.1: Tue Sep 14 20:56:24 PDT 2021; root:xnu-8019.30.61~4/RELEASE_ARM64_T6000 arm64'
checksum binary: 'shasum'
OS version: macOS 12.0 21A344
curl: /usr/bin/curl, curl 7.77.0 (x86_64-apple-darwin21.0) libcurl/7.77.0 (SecureTransport) LibreSSL/2.8.3 zlib/1.2.11 nghttp2/1.42.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.30.1 (Apple Git-130)
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
awk: /usr/bin/awk, awk version 20200816
nvm current: v16.3.0
which node: ${NVM_DIR}/versions/node/v16.3.0/bin/node
which iojs: iojs not found
which npm: ${NVM_DIR}/versions/node/v16.3.0/bin/npm
npm config get prefix: ${NVM_DIR}/versions/node/v16.3.0
npm root -g: ${NVM_DIR}/versions/node/v16.3.0/lib/node_modules
nvm ls output:
-> v16.3.0
v17.0.1
system
default -> node (-> v17.0.1)
iojs -> N/A (default)
unstable -> N/A (default)
node -> stable (-> v17.0.1) (default)
stable -> 17.0 (-> v17.0.1) (default)
lts/* -> lts/gallium (-> 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.7 (-> N/A)
lts/fermium -> v14.18.1 (-> N/A)
lts/gallium -> v16.13.0 (-> N/A)
How did you install nvm?
Homebrew
What steps did you perform?
nvm install 14.17.1
What happened?
It looked like it was installing but then it started to loop and error out indefinitely
What did you expect to happen?
I expected it to install the node version. I tested with other node versions and they installed and worked correctly.
Is there anything in any of your profile files that modifies the PATH?
.zshrc
If you are having installation issues, or getting "N/A", what does curl -I --compressed -v https://nodejs.org/dist/ print out?
* Trying 104.20.23.46:443...
* Connected to nodejs.org (104.20.23.46) port 443 (#0)
* ALPN, offering h2
* ALPN, offering http/1.1
* successfully set certificate verify locations:
* CAfile: /etc/ssl/cert.pem
* CApath: none
* TLSv1.2 (OUT), TLS handshake, Client hello (1):
* TLSv1.2 (IN), TLS handshake, Server hello (2):
* TLSv1.2 (IN), TLS handshake, Certificate (11):
* TLSv1.2 (IN), TLS handshake, Server key exchange (12):
* TLSv1.2 (IN), TLS handshake, Server finished (14):
* TLSv1.2 (OUT), TLS handshake, Client key exchange (16):
* TLSv1.2 (OUT), TLS change cipher, Change cipher spec (1):
* TLSv1.2 (OUT), TLS handshake, Finished (20):
* TLSv1.2 (IN), TLS change cipher, Change cipher spec (1):
* TLSv1.2 (IN), TLS handshake, Finished (20):
* SSL connection using TLSv1.2 / ECDHE-RSA-CHACHA20-POLY1305
* ALPN, server accepted to use h2
* Server certificate:
* subject: OU=Domain Control Validated; OU=PositiveSSL Wildcard; CN=*.nodejs.org
* start date: Oct 21 00:00:00 2019 GMT
* expire date: Jan 18 23:59:59 2022 GMT
* subjectAltName: host "nodejs.org" matched cert's "nodejs.org"
* issuer: C=GB; ST=Greater Manchester; L=Salford; O=Sectigo Limited; CN=Sectigo RSA Domain Validation Secure Server CA
* SSL certificate verify ok.
* Using HTTP2, server supports multi-use
* Connection state changed (HTTP/2 confirmed)
* Copying HTTP/2 data in stream buffer to connection buffer after upgrade: len=0
* Using Stream ID: 1 (easy handle 0x143811000)
> HEAD /dist/ HTTP/2
> Host: nodejs.org
> user-agent: curl/7.77.0
> accept: */*
> accept-encoding: deflate, gzip
>
* Connection state changed (MAX_CONCURRENT_STREAMS == 256)!
< HTTP/2 200
HTTP/2 200
< date: Fri, 29 Oct 2021 15:25:08 GMT
date: Fri, 29 Oct 2021 15:25:08 GMT
< content-type: text/html
content-type: text/html
< last-modified: Fri, 29 Oct 2021 14:35:10 GMT
last-modified: Fri, 29 Oct 2021 14:35:10 GMT
< cache-control: max-age=14400
cache-control: max-age=14400
< cf-cache-status: HIT
cf-cache-status: HIT
< age: 2446
age: 2446
< expect-ct: max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct"
expect-ct: max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct"
< vary: Accept-Encoding
vary: Accept-Encoding
< server: cloudflare
server: cloudflare
< cf-ray: 6a5d6a2e7f0635fd-LAX
cf-ray: 6a5d6a2e7f0635fd-LAX
< content-encoding: gzip
content-encoding: gzip
<
* Connection #0 to host nodejs.org left intact
Console output (shortened because it's way too much)
Downloading and installing node v14.17.1...
Downloading https://nodejs.org/dist/v14.17.1/node-v14.17.1-darwin-arm64.tar.xz...
curl: (22) The requested URL returned error: 404
Binary download from https://nodejs.org/dist/v14.17.1/node-v14.17.1-darwin-arm64.tar.xz failed, trying source.
grep: /Users/ryan/.nvm/.cache/bin/node-v14.17.1-darwin-arm64/node-v14.17.1-darwin-arm64.tar.xz: No such file or directory
Provided file to checksum does not exist.
Binary download failed, trying source.
Detected that you have 10 CPU core(s)
Running with 9 threads to speed up the build
Clang v3.5+ detected! CC or CXX not specified, will use Clang as C/C++ compiler!
Local cache found: ${NVM_DIR}/.cache/src/node-v14.17.1/node-v14.17.1.tar.xz
Checksums match! Using existing downloaded archive ${NVM_DIR}/.cache/src/node-v14.17.1/node-v14.17.1.tar.xz
$>./configure --prefix=/Users/ryan/.nvm/versions/node/v14.17.1 <
Node.js configure: Found Python 3.9.7...
INFO: configure completed successfully
/Library/Developer/CommandLineTools/usr/bin/make -C out BUILDTYPE=Release V=0
LD_LIBRARY_PATH=/Users/ryan/.nvm/.cache/src/node-v14.17.1/files/out/Release/lib.host:/Users/ryan/.nvm/.cache/src/node-v14.17.1/files/out/Release/lib.target:$LD_LIBRARY_PATH; export LD_LIBRARY_PATH; cd ../tools/icu; mkdir -p /Users/ryan/.nvm/.cache/src/node-v14.17.1/files/out/Release/obj/gen; "/Users/ryan/.nvm/.cache/src/node-v14.17.1/files/out/Release/icupkg" -tl ../../deps/icu-tmp/icudt69l.dat "/Users/ryan/.nvm/.cache/src/node-v14.17.1/files/out/Release/obj/gen/icudt69l.dat"
c++ -o /Users/ryan/.nvm/.cache/src/node-v14.17.1/files/out/Release/obj.target/bytecode_builtins_list_generator/deps/v8/src/builtins/generate-bytecodes-builtins-list.o ../deps/v8/src/builtins/generate-bytecodes-builtins-list.cc '-DV8_GYP_BUILD' '-DV8_TYPED_ARRAY_MAX_SIZE_IN_HEAP=64' '-D_DARWIN_USE_64_BIT_INODE=1' '-DOPENSSL_NO_PINSHARED' '-DOPENSSL_THREADS' '-DV8_TARGET_ARCH_ARM64' '-DV8_EMBEDDER_STRING="-node.67"' '-DENABLE_DISASSEMBLER' '-DV8_PROMISE_INTERNAL_FIELD_COUNT=1' '-DENABLE_MINOR_MC' '-DOBJECT_PRINT' '-DV8_INTL_SUPPORT' '-DV8_CONCURRENT_MARKING' '-DV8_ARRAY_BUFFER_EXTENSION' '-DV8_ENABLE_LAZY_SOURCE_POSITIONS' '-DV8_USE_SIPHASH' '-DDISABLE_UNTRUSTED_CODE_MITIGATIONS' '-DV8_WIN64_UNWINDING_INFO' '-DV8_ENABLE_REGEXP_INTERPRETER_THREADED_DISPATCH' '-DV8_SNAPSHOT_COMPRESSION' -I../deps/v8 -I../deps/v8/include -O3 -gdwarf-2 -fstrict-aliasing -mmacosx-version-min=10.13 -arch arm64 -Wall -Wendif-labels -W -Wno-unused-parameter -std=gnu++1y -stdlib=libc++ -fno-rtti -fno-exceptions -fno-strict-aliasing -MMD -MF /Users/ryan/.nvm/.cache/src/node-v14.17.1/files/out/Release/.deps//Users/ryan/.nvm/.cache/src/node-v14.17.1/files/out/Release/obj.target/bytecode_builtins_list_generator/deps/v8/src/builtins/generate-bytecodes-builtins-list.o.d.raw -c
c++ -o /Users/ryan/.nvm/.cache/src/node-v14.17.1/files/out/Release/obj.target/bytecode_builtins_list_generator/deps/v8/src/interpreter/bytecodes.o ../deps/v8/src/interpreter/bytecodes.cc '-DV8_GYP_BUILD' '-DV8_TYPED_ARRAY_MAX_SIZE_IN_HEAP=64' '-D_DARWIN_USE_64_BIT_INODE=1' '-DOPENSSL_NO_PINSHARED' '-DOPENSSL_THREADS' '-DV8_TARGET_ARCH_ARM64' '-DV8_EMBEDDER_STRING="-node.67"' '-DENABLE_DISASSEMBLER' '-DV8_PROMISE_INTERNAL_FIELD_COUNT=1' '-DENABLE_MINOR_MC' '-DOBJECT_PRINT' '-DV8_INTL_SUPPORT' '-DV8_CONCURRENT_MARKING' '-DV8_ARRAY_BUFFER_EXTENSION' '-DV8_ENABLE_LAZY_SOURCE_POSITIONS' '-DV8_USE_SIPHASH' '-DDISABLE_UNTRUSTED_CODE_MITIGATIONS' '-DV8_WIN64_UNWINDING_INFO' '-DV8_ENABLE_REGEXP_INTERPRETER_THREADED_DISPATCH' '-DV8_SNAPSHOT_COMPRESSION' -I../deps/v8 -I../deps/v8/include -O3 -gdwarf-2 -fstrict-aliasing -mmacosx-version-min=10.13 -arch arm64 -Wall -Wendif-labels -W -Wno-unused-parameter -std=gnu++1y -stdlib=libc++ -fno-rtti -fno-exceptions -fno-strict-aliasing -MMD -MF /Users/ryan/.nvm/.cache/src/node-v14.17.1/files/out/Release/.deps//Users/ryan/.nvm/.cache/src/node-v14.17.1/files/out/Release/obj.target/bytecode_builtins_list_generator/deps/v8/src/interpreter/bytecodes.o.d.raw -c
c++ -o /Users/ryan/.nvm/.cache/src/node-v14.17.1/files/out/Release/obj.target/torque_base/deps/v8/src/torque/implementation-visitor.o ../deps/v8/src/torque/implementation-visitor.cc '-DV8_GYP_BUILD' '-DV8_TYPED_ARRAY_MAX_SIZE_IN_HEAP=64' '-D_DARWIN_USE_64_BIT_INODE=1' '-DOPENSSL_NO_PINSHARED' '-DOPENSSL_THREADS' '-DV8_TARGET_ARCH_ARM64' '-DV8_EMBEDDER_STRING="-node.67"' '-DENABLE_DISASSEMBLER' '-DV8_PROMISE_INTERNAL_FIELD_COUNT=1' '-DENABLE_MINOR_MC' '-DOBJECT_PRINT' '-DV8_INTL_SUPPORT' '-DV8_CONCURRENT_MARKING' '-DV8_ARRAY_BUFFER_EXTENSION' '-DV8_ENABLE_LAZY_SOURCE_POSITIONS' '-DV8_USE_SIPHASH' '-DDISABLE_UNTRUSTED_CODE_MITIGATIONS' '-DV8_WIN64_UNWINDING_INFO' '-DV8_ENABLE_REGEXP_INTERPRETER_THREADED_DISPATCH' '-DV8_SNAPSHOT_COMPRESSION' -I../deps/v8 -I../deps/v8/include -O3 -gdwarf-2 -fstrict-aliasing -mmacosx-version-min=10.13 -arch arm64 -Wall -Wendif-labels -W -Wno-unused-parameter -std=gnu++1y -stdlib=libc++ -fno-rtti -fno-strict-aliasing -MMD -MF /Users/ryan/.nvm/.cache/src/node-v14.17.1/files/out/Release/.deps//Users/ryan/.nvm/.cache/src/node-v14.17.1/files/out/Release/obj.target/torque_base/deps/v8/src/torque/implementation-visitor.o.d.raw -c
First, I want to note that nvm should not be installed via homebrew, and we do not support any homebrew installs - please brew uninstall it and install it according to the instructions in the readme.
That said, do you have an M1 Mac? node 14 (anything less than 16, iirc) doesn't work on those unless you install them in Rosetta.
@zaxoavoki whatever versions of node they do not provide with m1 support, you indeed require rosetta to install, yes.
If node provides a version with m1 support, you should be able to install it on an m1 mac, with or without nvm.
I had the same issue and installed node v16 because it supports M1
having the same issue