nvm: nvm install --lts failed

  • Operating system and version: osx 10.12.6

  • nvm debug output:


nvm --version: v0.33.0
$SHELL: /bin/bash
$HOME: /Users/ruiguo
$NVM_DIR: '$HOME/.nvm'
$PREFIX: ''
$NPM_CONFIG_PREFIX: ''
nvm current: system
which node: /usr/local/bin/node
which iojs: 
which npm: /usr/local/bin/npm
npm config get prefix: /usr/local
npm root -g: /usr/local/lib/node_modules
  • nvm ls output:
->       system
node -> stable (-> N/A) (default)
iojs -> N/A (default)
grep: brackets ([ ]) not balanced
sed: 8: "
            s#/Users/r ...": unbalanced brackets ([])
lts/* -> lts/<![endif]--> (-> N/A)
sed: 8: "
            s#/Users/r ...": unbalanced brackets ([])
lts/<![endif]--> -> <!--[if (-> N/A)
sed: 8: "
            s#/Users/r ...": unbalanced brackets ([])
lts/><![endif]--> -> <!--[if (-> N/A)

Installing latest LTS version.

Detected that you have 4 CPU core(s)

Running with 3 threads to speed up the build

grep: brackets ([ ]) not balanced

Downloading https://nodejs.org/dist/node-<!--[if.tar.gz...

curl: (3) [globbing] bad range in column 35

Binary download from https://nodejs.org/dist/node-<!--[if.tar.gz failed, trying source.

grep: /Users/ruiguo/.nvm/.cache/src/node-<!--[if/node-<!--[if.tar.gz: No such file or directory

Provided file to checksum does not exist.

nvm: install <!--[if failed!
  • What did you expect to happen? How to install?
  • Is there anything in any of your profile files (.bashrc, .bash_profile, .zshrc, etc) that modifies the PATH? I think that does not matter
  • If you are having installation issues, or getting “N/A”, what does curl -I --compressed -v https://nodejs.org/dist/ print out?
curl -I --compressed -v https://nodejs.org/dist/
*   Trying 104.20.22.46...
* TCP_NODELAY set
*   Trying 2400:cb00:2048:1::6814:172e...
* TCP_NODELAY set
* Immediate connect fail for 2400:cb00:2048:1::6814:172e: No route to host
*   Trying 2400:cb00:2048:1::6814:162e...
* TCP_NODELAY set
* Immediate connect fail for 2400:cb00:2048:1::6814:162e: No route to host
* Connected to nodejs.org (104.20.22.46) port 443 (#0)
* TLS 1.2 connection using TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256
* Server certificate: *.nodejs.org
* Server certificate: COMODO RSA Domain Validation Secure Server CA
* Server certificate: COMODO RSA Certification Authority
> HEAD /dist/ HTTP/1.1
> Host: nodejs.org
> User-Agent: curl/7.54.0
> Accept: */*
> Accept-Encoding: deflate, gzip
> 
< HTTP/1.1 403 Forbidden
HTTP/1.1 403 Forbidden
< Date: Wed, 13 Dec 2017 03:15:50 GMT
Date: Wed, 13 Dec 2017 03:15:50 GMT
< Content-Type: text/html; charset=UTF-8
Content-Type: text/html; charset=UTF-8
< Connection: close
Connection: close
< Set-Cookie: __cfduid=d4f20af1753e377233a26c51bb06607dd1513134950; expires=Thu, 13-Dec-18 03:15:50 GMT; path=/; domain=.nodejs.org; HttpOnly
Set-Cookie: __cfduid=d4f20af1753e377233a26c51bb06607dd1513134950; expires=Thu, 13-Dec-18 03:15:50 GMT; path=/; domain=.nodejs.org; HttpOnly
< CF-Chl-Bypass: 1
CF-Chl-Bypass: 1
< Cache-Control: max-age=2
Cache-Control: max-age=2
< Expires: Wed, 13 Dec 2017 03:15:52 GMT
Expires: Wed, 13 Dec 2017 03:15:52 GMT
< X-Frame-Options: SAMEORIGIN
X-Frame-Options: SAMEORIGIN
< Server: cloudflare-nginx
Server: cloudflare-nginx
< CF-RAY: 3cc5c2debc9b2876-SJC
CF-RAY: 3cc5c2debc9b2876-SJC

< 
* Closing connection 0

About this issue

  • Original URL
  • State: open
  • Created 7 years ago
  • Reactions: 1
  • Comments: 18 (8 by maintainers)

Most upvoted comments

Great! It works, and thank you for your quick response!

@ljharb

am getting this from my Makefile:

bash -l -c 'nvm exec v8.9.3 yarn add --save deck.gl luma.gl'
Environment:
nvm is not compatible with the npm config "prefix" option: currently set to "/usr/local"
Run `npm config delete prefix` or `nvm use --delete-prefix v6.11.2 --silent` to unset it.

bash_profile:

export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" # This loads nvm
echoLog "Nvm (node)" $NVM_DIR

I tried doing the npm config delete prefix and nvm use --delete-prefix v6.11.2 --silent, but neither changes the result.

hope this helps


Update i fixed it

  1. updated to latest nvm
  2. removed the start script from .bashrc and left it in .bash_profile

all good now