Skip to content
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

-bash: nvm_ls node: command not found #1514

Closed
gudyo opened this issue Apr 26, 2017 · 6 comments
Closed

-bash: nvm_ls node: command not found #1514

gudyo opened this issue Apr 26, 2017 · 6 comments

Comments

@gudyo
Copy link

gudyo commented Apr 26, 2017

  • Operating system and version:
    Mac OS X 10.12.4 (Sierra)

  • nvm debug output:

nvm --version: v0.33.2
$SHELL: /bin/bash
$HOME: /Users/ppetrova
$NVM_DIR: '$HOME/.nvm'
$PREFIX: ''
$NPM_CONFIG_PREFIX: ''
$NVM_NODEJS_ORG_MIRROR: 'https://nodejs.org/dist'
$NVM_IOJS_ORG_MIRROR: ''
shell version: 'GNU bash, version 3.2.57(1)-release (x86_64-apple-darwin16)'
uname -a: 'Darwin 16.5.0 Darwin Kernel Version 16.5.0: Fri Mar 3 16:52:33 PST 2017; root:xnu-3789.51.2~3/RELEASE_X86_64 x86_64'
OS version: Mac 10.12.4 16E195
curl: /usr/bin/curl, curl 7.51.0 (x86_64-apple-darwin16.0) libcurl/7.51.0 SecureTransport zlib/1.2.8
wget: not found
git: /usr/local/bin/git, git version 2.12.0
nvm current: -bash: nvm current: command not found
which node: -bash: which node: command not found
which iojs: -bash: which iojs: command not found
which npm: -bash: which npm: command not found
npm config get prefix: -bash: npm config get prefix: command not found
npm root -g: -bash: npm root -g: command not found
  • nvm ls output:
               
->       system
node -> stable (-> N/A) (default)
-bash: nvm_ls node: command not found
-bash: nvm_ls node: command not found
-bash: nvm_ls iojs: command not found
iojs -> iojs- (-> N/A) (default)
lts/* -> lts/boron (-> N/A)
lts/argon -> v4.8.2 (-> N/A)
lts/boron -> v6.10.2 (-> N/A)
  • 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...
* TCP_NODELAY set
* Connected to nodejs.org (104.20.23.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.51.0
> Accept: */*
> Accept-Encoding: deflate, gzip
> 
< HTTP/1.1 301 Moved Permanently
HTTP/1.1 301 Moved Permanently
< Date: Wed, 26 Apr 2017 21:39:14 GMT
Date: Wed, 26 Apr 2017 21:39:14 GMT
< Content-Type: text/html
Content-Type: text/html
< Connection: keep-alive
Connection: keep-alive
< Set-Cookie: __cfduid=db0d07f999c1be07ab67d2021dea09b741493242754; expires=Thu, 26-Apr-18 21:39:14 GMT; path=/; domain=.nodejs.org; HttpOnly
Set-Cookie: __cfduid=db0d07f999c1be07ab67d2021dea09b741493242754; expires=Thu, 26-Apr-18 21:39:14 GMT; path=/; domain=.nodejs.org; HttpOnly
< Location: https://nodejs.org/dist/
Location: https://nodejs.org/dist/
< CF-Cache-Status: EXPIRED
CF-Cache-Status: EXPIRED
< Vary: Accept-Encoding
Vary: Accept-Encoding
< Expires: Thu, 27 Apr 2017 01:39:14 GMT
Expires: Thu, 27 Apr 2017 01:39:14 GMT
< Cache-Control: public, max-age=14400
Cache-Control: public, max-age=14400
< Server: cloudflare-nginx
Server: cloudflare-nginx
< CF-RAY: 355cb18e5ff30edf-EWR
CF-RAY: 355cb18e5ff30edf-EWR

< 
* Curl_http_done: called premature == 0
* Connection #0 to host nodejs.org left intact
@ljharb
Copy link
Member

ljharb commented Apr 26, 2017

It's saying command not found - what does which command print out?

@gudyo
Copy link
Author

gudyo commented Apr 26, 2017

Hi Jordan :) I believe we know each other! (Plamena from Twitter).

Which command -> /usr/bin/command

@gudyo
Copy link
Author

gudyo commented Apr 26, 2017

i tried nvm install 5.12 and get
nvm install 5.12 -bash: command sort -t. -u -k 1.2,1n -k 2,2n -k 3,3n: command not found -bash: command sort: command not found

yet when i run which sort i get
/usr/bin/sort

I also tried nvm list and that spits out
N/A node -> stable (-> N/A) (default) -bash: nvm_ls node: command not found -bash: nvm_ls node: command not found -bash: nvm_ls iojs: command not found iojs -> iojs- (-> N/A) (default) lts/* -> lts/boron (-> N/A) lts/argon -> v4.8.2 (-> N/A) lts/boron -> v6.10.2 (-> N/A)

nvm ls-remote returns:
-bash: command sort -t. -u -k 1.2,1n -k 2,2n -k 3,3n: command not found -bash: command sort: command not found N/A

@ljharb
Copy link
Member

ljharb commented Apr 27, 2017

@bachateraconfuego Hi!! any chance you've got IFS set to something besides space-tab-newline?

@gudyo
Copy link
Author

gudyo commented Apr 27, 2017

Hi :)
I get two blank lines when i echo it but I can try to explicitly set it to space-tab-newline

@gudyo
Copy link
Author

gudyo commented Apr 27, 2017

UPDATE: setting the IFS to ' ' from 1227 fixed it! THANK YOU!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants