Repository navigation
Closed
Description
I keep getting this message:
~ :> nvm install 6.11.3
Clang v3.5+ detected! CC or CXX not specified, will use Clang as C/C++ compiler!
Downloading https://nodejs.org/dist/node-v6.11.3.tar.gz...
curl: (3) [globbing] bad range in column 32
Binary download from https://nodejs.org/dist/node-v6.11.3.tar.gz failed, trying source.
grep: /Users/Benedict/.nvm/.cache/src/node-\033[01;31m\033[Kv6.11.3\033[m\033[K/node-\033[01;31m\033[Kv6.11.3\033[m\033[K.tar.gz: No such file or directory
Provided file to checksum does not exist.
I'm a newbie to all of this so forgive me if there is an obvious problem. But as it is I can't get nvm to work. It happens no matter which version of node I try to install. "nvm install node" or "nvm install stable" give this message:
~ :> nvm install node
grep: brackets ([ ]) not balanced
awk: nonterminated character class v0.12.18
input record number 1, file
source line number 3
Version 'node' not found - try nvm ls-remote to browse available versions.
-
Operating system and version: macOS Sierra 10.12.6
-
nvm debugoutput:
Details
nvm --version: v0.33.4
$TERM_PROGRAM: iTerm.app
$SHELL: /bin/bash
$HOME: /Users/Benedict
$NVM_DIR: '$HOME/.nvm'
$PREFIX: ''
$NPM_CONFIG_PREFIX: ''
$NVM_NODEJS_ORG_MIRROR: ''
$NVM_IOJS_ORG_MIRROR: ''
shell version: 'GNU bash, version 3.2.57(1)-release (x86_64-apple-darwin16)'
uname -a: 'Darwin 16.7.0 Darwin Kernel Version 16.7.0: Thu Jun 15 17:36:27 PDT 2017; root:xnu-3789.70.16~2/RELEASE_X86_64 x86_64'
OS version: Mac 10.12.6 16G29
curl: /usr/bin/curl, curl 7.54.0 (x86_64-apple-darwin16.0) libcurl/7.54.0 SecureTransport zlib/1.2.8
wget: not found
git: /usr/local/bin/git, git version 2.12.0
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_modulesnvm lsoutput:
Details
-> system
node -> stable (-> N/A) (default)
iojs -> N/A (default)
lts/* -> lts/boron (-> N/A)
lts/argon -> v4.8.4 (-> N/A)
lts/boron -> v6.11.3 (-> N/A)-
How did you install
nvm? (e.g. install script in readme, homebrew): brew -
What steps did you perform?
-
What happened?
-
What did you expect to happen?
-
Is there anything in any of your profile files (
.bashrc,.bash_profile,.zshrc, etc) that modifies thePATH?
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion
source ~/.bashrc
- If you are having installation issues, or getting "N/A", what does
curl -I --compressed -v https://nodejs.org/dist/print out?
Details
* Trying 2400:cb00:2048:1::6814:172e...
* TCP_NODELAY set
* Trying 104.20.22.46...
* TCP_NODELAY set
* 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 200 OK
HTTP/1.1 200 OK
< Date: Thu, 21 Sep 2017 02:46:28 GMT
Date: Thu, 21 Sep 2017 02:46:28 GMT
< Content-Type: text/html
Content-Type: text/html
< Connection: keep-alive
Connection: keep-alive
< Set-Cookie: __cfduid=dbf2b2bc7fcfabf9bd0c7ef454043da541505961988; expires=Fri, 21-Sep-18 02:46:28 GMT; path=/; domain=.nodejs.org; HttpOnly
Set-Cookie: __cfduid=dbf2b2bc7fcfabf9bd0c7ef454043da541505961988; expires=Fri, 21-Sep-18 02:46:28 GMT; path=/; domain=.nodejs.org; HttpOnly
< CF-Cache-Status: HIT
CF-Cache-Status: HIT
< Vary: Accept-Encoding
Vary: Accept-Encoding
< Expires: Thu, 21 Sep 2017 06:46:28 GMT
Expires: Thu, 21 Sep 2017 06:46:28 GMT
< Cache-Control: public, max-age=14400
Cache-Control: public, max-age=14400
< Server: cloudflare-nginx
Server: cloudflare-nginx
< CF-RAY: 3a19b1ba08f309b2-ORD
CF-RAY: 3a19b1ba08f309b2-ORD
< Content-Encoding: gzip
Content-Encoding: gzip
<
* Connection #0 to host nodejs.org left intact
Reacted by Pavel Kalashnikov, Florian Rudin, Wagner, saurabhshri-evive, Talha Meh, Brian Cooney, Yakiv Ponomarenko and Bui Gia Thinh Sharefull
Metadata
Metadata
Assignees
Labels
No labels
Activity
ljharb commentedon Sep 21, 2017
I see you're using iTerm; can you try in the normal Terminal? If that works, then maybe you have some nonstandard text encoding set in iTerm?
Alternatively, do you override any shell builtins like
greporawkorcurlin any of your profile files?benedictSchurwanz commentedon Sep 21, 2017
tried Terminal, same results for
nvm install 6andnvm install node.I checked my .bash_profile, the only thing grep related I see is
export GREP_OPTIONS='--color=always'. Nothing forawkorcurl. I haven't played with those things purposely.ljharb commentedon Sep 22, 2017
hm, there are a few places still where
grepis used without resettingGREP_OPTIONS; if you comment out that line and restart your terminal, does the same thing still occur?benedictSchurwanz commentedon Sep 22, 2017
holy cow I think it's working... why would that do it?
ljharb commentedon Sep 22, 2017
nvmis sourced, so it's directly affected by any shell options you set.The color control characters are probably breaking nvm's parsing of
grepoutput.I'll work on a fix to replace all remaining uses of
grepwithnvm_grep, which was added explicitly to work around this kind of problem :-)benedictSchurwanz commentedon Sep 22, 2017
Thanks!!
benedictSchurwanz commentedon Sep 22, 2017
grep: /Users/Benedict/.nvm/.cache/src/node-\033[01;31m\033[Kv6.11.3\033[m\033[K/node-\033[01;31m\033[Kv6.11.3\033[m\033[K.tar.gz: No such file or directoryare the color control characters in there?
benedictSchurwanz commentedon Sep 22, 2017
does this apply?
https://unix.stackexchange.com/questions/45190/grep-color-adds-ansi-code-esck-this-can-change-displayed-text
ljharb commentedon Sep 22, 2017
Yes -
\033,[01;31m, etc[Fix] ensure all `grep` calls go through `nvm_grep`.
ljharb commentedon Sep 23, 2017
So I've got a commit that fixes the last places that were using an unwrapped
grep, but none of those should have caused the issue you had here.ljharb commentedon Sep 23, 2017
@benedictify if you uncomment the line again, and
set -xfirst, what doesnvm install nodeprint out?benedictSchurwanz commentedon Sep 29, 2017
when I did set -x and nvm install node, with the grep color options line uncommented, it spit out dozens of screens worth of stuff, and didn't install it. (I do have it installed now though)
ljharb commentedon Sep 29, 2017
My hope was to capture that exact output, so I can debug it. Do you still have it?
If not, and if the same command worked later, then it might have been a network issue or an issue with nodejs.org.
nopmop commentedon Apr 1, 2018
not sure if it helps, but I just noticed that lack of write-permission on some dir(s) inside
nvm_downloadsresults in downloading the source.[Fix] ensure all `grep` calls go through `nvm_grep`.
[Fix] ensure all `grep` calls go through `nvm_grep`.
ljharb commentedon Apr 9, 2019
ljharb commentedon Apr 9, 2019
Closing until i can repro further.