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

N/A version is not installed yet #437

Closed
robtweed opened this Issue Jun 17, 2014 · 45 comments

Comments

Projects
None yet
@robtweed

robtweed commented Jun 17, 2014

Installing latest NVM on a Ubuntu 14.04 EC2 AMI using:

curl https://raw.githubusercontent.com/creationix/nvm/v0.7.0/install.sh | sh

Produces the message:

N/A version is not yet installed

whenever ~/.nvm/nvm,sh is invoked

It will, however, install and use Node.js versions.

Haven't seen this message before - just appears to have started today?

@TankMasterRL

This comment has been minimized.

Show comment
Hide comment
@TankMasterRL

TankMasterRL Jun 18, 2014

I have the same issue.

TankMasterRL commented Jun 18, 2014

I have the same issue.

@mgerton

This comment has been minimized.

Show comment
Hide comment
@mgerton

mgerton Jun 18, 2014

Also seeing this as well. Anytime I source my .bashrc this message is appearing.

mgerton commented Jun 18, 2014

Also seeing this as well. Anytime I source my .bashrc this message is appearing.

@ljharb

This comment has been minimized.

Show comment
Hide comment
@ljharb

ljharb Jun 18, 2014

Collaborator

If you try nvm alias default 0.10, what happens?

Collaborator

ljharb commented Jun 18, 2014

If you try nvm alias default 0.10, what happens?

@heymanhn

This comment has been minimized.

Show comment
Hide comment
@heymanhn

heymanhn Jun 19, 2014

I get this output:

default -> 0.10 (-> N/A)

heymanhn commented Jun 19, 2014

I get this output:

default -> 0.10 (-> N/A)

@ljharb

This comment has been minimized.

Show comment
Hide comment
@ljharb

ljharb Jun 19, 2014

Collaborator

do you have a node 0.10 version installed? ie, after nvm install 0.10, then nvm use default should work.

Collaborator

ljharb commented Jun 19, 2014

do you have a node 0.10 version installed? ie, after nvm install 0.10, then nvm use default should work.

@heymanhn

This comment has been minimized.

Show comment
Hide comment
@heymanhn

heymanhn Jun 19, 2014

Yes, the command worked after I installed 0.10. Thanks!

heymanhn commented Jun 19, 2014

Yes, the command worked after I installed 0.10. Thanks!

@ljharb ljharb closed this Jun 19, 2014

@mgerton

This comment has been minimized.

Show comment
Hide comment
@mgerton

mgerton Jun 19, 2014

nvm alias default 0.10 worked for me as well. Thanks!

mgerton commented Jun 19, 2014

nvm alias default 0.10 worked for me as well. Thanks!

@arvenil

This comment has been minimized.

Show comment
Hide comment
@arvenil

arvenil Jun 28, 2014

nvm alias default 0.10.29 worked for me too! But shouldn't that be fixed?

arvenil commented Jun 28, 2014

nvm alias default 0.10.29 worked for me too! But shouldn't that be fixed?

@ljharb

This comment has been minimized.

Show comment
Hide comment
@ljharb

ljharb Jun 28, 2014

Collaborator

It's fixed now as of v0.10.0

Collaborator

ljharb commented Jun 28, 2014

It's fixed now as of v0.10.0

@arvenil

This comment has been minimized.

Show comment
Hide comment
@arvenil

arvenil Jun 28, 2014

This is what I have run yesterday and I run into the same problem:

curl https://raw.githubusercontent.com/creationix/nvm/master/install.sh | sh
. ~/.profile
nvm install v0.10.29

arvenil commented Jun 28, 2014

This is what I have run yesterday and I run into the same problem:

curl https://raw.githubusercontent.com/creationix/nvm/master/install.sh | sh
. ~/.profile
nvm install v0.10.29
@ljharb

This comment has been minimized.

Show comment
Hide comment
@ljharb

ljharb Jun 29, 2014

Collaborator

Hmm, thanks for the report - can you provide your shell details? Also, to confirm, you're seeing the message "N/A version is not yet installed"? At what point?

(Also, please don't install from master, always install from a tagged release version - curl https://raw.githubusercontent.com/creationix/nvm/v0.10.0/install.sh | sh is the latest, and is in the README)

Collaborator

ljharb commented Jun 29, 2014

Hmm, thanks for the report - can you provide your shell details? Also, to confirm, you're seeing the message "N/A version is not yet installed"? At what point?

(Also, please don't install from master, always install from a tagged release version - curl https://raw.githubusercontent.com/creationix/nvm/v0.10.0/install.sh | sh is the latest, and is in the README)

@2hu12

This comment has been minimized.

Show comment
Hide comment
@2hu12

2hu12 Feb 16, 2015

N/A version is not yet installed The reason you see this info is because you have set a alias for a specific version of node, and you delete this version after, so the alias is now N/A, use nvm ls you'll get it!

2hu12 commented Feb 16, 2015

N/A version is not yet installed The reason you see this info is because you have set a alias for a specific version of node, and you delete this version after, so the alias is now N/A, use nvm ls you'll get it!

@jkarttunen

This comment has been minimized.

Show comment
Hide comment
@jkarttunen

jkarttunen Jan 5, 2016

Actually you can get stuck to this phase if you try to set to default a nonexistent version.

jkarttunen@juha~> nvm alias default v4.3.2
! WARNING: Version 'v4.3.2' does not exist.
default -> v4.3.2 (-> N/A)
jkarttunen@juha~> nvm alias default v4.2.3
N/A: version "v4.3.2" is not yet installed
jkarttunen@juha~> nvm list
N/A: version "v4.3.2" is not yet installed

jkarttunen commented Jan 5, 2016

Actually you can get stuck to this phase if you try to set to default a nonexistent version.

jkarttunen@juha~> nvm alias default v4.3.2
! WARNING: Version 'v4.3.2' does not exist.
default -> v4.3.2 (-> N/A)
jkarttunen@juha~> nvm alias default v4.2.3
N/A: version "v4.3.2" is not yet installed
jkarttunen@juha~> nvm list
N/A: version "v4.3.2" is not yet installed
@ljharb

This comment has been minimized.

Show comment
Hide comment
@ljharb

ljharb Jan 5, 2016

Collaborator

@jkarttunen ooh, that's a great find, thanks!

Collaborator

ljharb commented Jan 5, 2016

@jkarttunen ooh, that's a great find, thanks!

@ljharb

This comment has been minimized.

Show comment
Hide comment
@ljharb

ljharb Jan 5, 2016

Collaborator

@jkarttunen however, I can't reproduce that problem. what version of nvm do you have, and what does nvm debug print out?

Collaborator

ljharb commented Jan 5, 2016

@jkarttunen however, I can't reproduce that problem. what version of nvm do you have, and what does nvm debug print out?

@jkarttunen

This comment has been minimized.

Show comment
Hide comment
@jkarttunen

jkarttunen Jan 5, 2016

Already deleted it. nvm 0.30.1

jkarttunen commented Jan 5, 2016

Already deleted it. nvm 0.30.1

@jkarttunen

This comment has been minimized.

Show comment
Hide comment
@jkarttunen

jkarttunen Jan 5, 2016

jkarttunen@juha~> rm -rf ~/.nvm
jkarttunen@juha~> rm -rf ~/.bower
jkarttunen@juha~> rm -rf ~/.npm
jkarttunen@juha~> curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.30.1/install.sh | bash
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  7735  100  7735    0     0   8324      0 --:--:-- --:--:-- --:--:--  8317
=> Downloading nvm from git to '/Users/jkarttunen/.nvm'
=> Cloning into '/Users/jkarttunen/.nvm'...
remote: Counting objects: 4308, done.
remote: Compressing objects: 100% (27/27), done.
remote: Total 4308 (delta 14), reused 0 (delta 0), pack-reused 4281
Receiving objects: 100% (4308/4308), 1.06 MiB | 446.00 KiB/s, done.
Resolving deltas: 100% (2521/2521), done.
Checking connectivity... done.
* (HEAD detached at v0.30.1)
  master

=> Source string already in /Users/jkarttunen/.profile
=> Close and reopen your terminal to start using nvm
jkarttunen@juha~> nvm debug
nvm --version: v0.30.1
$SHELL: /usr/local/bin/fish
$HOME: /Users/jkarttunen
$NVM_DIR: '$HOME/.nvm'
$PREFIX: ''
$NPM_CONFIG_PREFIX: ''
nvm current: none
which node:
which iojs:
which npm:
npm config get prefix: $NVM_DIR/nvm.sh: line 1562: npm: command not found
npm root -g: $NVM_DIR/nvm.sh: line 1562: npm: command not found
/Users/jkarttunen/.nvm/nvm.sh: line 1565: [: : integer expression expected
jkarttunen@juha~> nvm install 4.2.3
Downloading https://nodejs.org/dist/v4.2.3/node-v4.2.3-darwin-x64.tar.gz...
######################################################################## 100.0%
WARNING: checksums are currently disabled for node.js v4.0 and later
Now using node v4.2.3 (npm v2.14.7)
jkarttunen@juha~> nvm alias default v4.2.3
default -> v4.2.3
jkarttunen@juha~> nvm ls
->       v4.2.3
default -> v4.2.3
node -> stable (-> v4.2.3) (default)
stable -> 4.2 (-> v4.2.3) (default)
iojs -> N/A (default)
jkarttunen@juha~> nvm alias default v4.3.2
! WARNING: Version 'v4.3.2' does not exist.
default -> v4.3.2 (-> N/A)
jkarttunen@juha~> nvm ls
N/A: version "v4.3.2" is not yet installed
jkarttunen@juha~> nvm debug
N/A: version "v4.3.2" is not yet installed

jkarttunen commented Jan 5, 2016

jkarttunen@juha~> rm -rf ~/.nvm
jkarttunen@juha~> rm -rf ~/.bower
jkarttunen@juha~> rm -rf ~/.npm
jkarttunen@juha~> curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.30.1/install.sh | bash
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  7735  100  7735    0     0   8324      0 --:--:-- --:--:-- --:--:--  8317
=> Downloading nvm from git to '/Users/jkarttunen/.nvm'
=> Cloning into '/Users/jkarttunen/.nvm'...
remote: Counting objects: 4308, done.
remote: Compressing objects: 100% (27/27), done.
remote: Total 4308 (delta 14), reused 0 (delta 0), pack-reused 4281
Receiving objects: 100% (4308/4308), 1.06 MiB | 446.00 KiB/s, done.
Resolving deltas: 100% (2521/2521), done.
Checking connectivity... done.
* (HEAD detached at v0.30.1)
  master

=> Source string already in /Users/jkarttunen/.profile
=> Close and reopen your terminal to start using nvm
jkarttunen@juha~> nvm debug
nvm --version: v0.30.1
$SHELL: /usr/local/bin/fish
$HOME: /Users/jkarttunen
$NVM_DIR: '$HOME/.nvm'
$PREFIX: ''
$NPM_CONFIG_PREFIX: ''
nvm current: none
which node:
which iojs:
which npm:
npm config get prefix: $NVM_DIR/nvm.sh: line 1562: npm: command not found
npm root -g: $NVM_DIR/nvm.sh: line 1562: npm: command not found
/Users/jkarttunen/.nvm/nvm.sh: line 1565: [: : integer expression expected
jkarttunen@juha~> nvm install 4.2.3
Downloading https://nodejs.org/dist/v4.2.3/node-v4.2.3-darwin-x64.tar.gz...
######################################################################## 100.0%
WARNING: checksums are currently disabled for node.js v4.0 and later
Now using node v4.2.3 (npm v2.14.7)
jkarttunen@juha~> nvm alias default v4.2.3
default -> v4.2.3
jkarttunen@juha~> nvm ls
->       v4.2.3
default -> v4.2.3
node -> stable (-> v4.2.3) (default)
stable -> 4.2 (-> v4.2.3) (default)
iojs -> N/A (default)
jkarttunen@juha~> nvm alias default v4.3.2
! WARNING: Version 'v4.3.2' does not exist.
default -> v4.3.2 (-> N/A)
jkarttunen@juha~> nvm ls
N/A: version "v4.3.2" is not yet installed
jkarttunen@juha~> nvm debug
N/A: version "v4.3.2" is not yet installed
@ljharb

This comment has been minimized.

Show comment
Hide comment
@ljharb

ljharb Jan 5, 2016

Collaborator

ah - nvm isn't compatible with the fish shell. It only supports sh, dash, ksh, zsh, and bash.

Collaborator

ljharb commented Jan 5, 2016

ah - nvm isn't compatible with the fish shell. It only supports sh, dash, ksh, zsh, and bash.

@jkarttunen

This comment has been minimized.

Show comment
Hide comment
@jkarttunen

jkarttunen Jan 5, 2016

Oh yeah, thanks. Seems to work on bash side. Forgot it was working with https://github.com/passcod/nvm-fish-wrapper

jkarttunen commented Jan 5, 2016

Oh yeah, thanks. Seems to work on bash side. Forgot it was working with https://github.com/passcod/nvm-fish-wrapper

@vertex

This comment has been minimized.

Show comment
Hide comment
@vertex

vertex Mar 2, 2016

For those having this issue with fish, drop down to sh by executing sh, then do this with a version of node you have installed (nvm ls):

sh-3.2$ nvm  alias default 0.10
default -> 0.10 (-> v0.10.40)
sh-3.2$ nvm use 0.10
Now using node v0.10.40 (npm v1.4.28)
sh-3.2$ nvm  alias default 0.10
default -> 0.10 (-> v0.10.40)

vertex commented Mar 2, 2016

For those having this issue with fish, drop down to sh by executing sh, then do this with a version of node you have installed (nvm ls):

sh-3.2$ nvm  alias default 0.10
default -> 0.10 (-> v0.10.40)
sh-3.2$ nvm use 0.10
Now using node v0.10.40 (npm v1.4.28)
sh-3.2$ nvm  alias default 0.10
default -> 0.10 (-> v0.10.40)
@Hollyw00d

This comment has been minimized.

Show comment
Hide comment
@Hollyw00d

Hollyw00d Jun 20, 2016

On Mac Terminal, I used nvm alias default system and then nvm use system to get rid of this error.

Hollyw00d commented Jun 20, 2016

On Mac Terminal, I used nvm alias default system and then nvm use system to get rid of this error.

@zhoukai07

This comment has been minimized.

Show comment
Hide comment
@zhoukai07

zhoukai07 Aug 30, 2016

Hi I tried on Mac Terminal but it returns the same error. Any idea what could be the reason? nvm is V6.5.0

zhoukai07 commented Aug 30, 2016

Hi I tried on Mac Terminal but it returns the same error. Any idea what could be the reason? nvm is V6.5.0

@Hollyw00d

This comment has been minimized.

Show comment
Hide comment
@Hollyw00d

Hollyw00d Aug 30, 2016

@zhoukai07 can you please comment with the error that Mac Terminal is giving you? Then I will look more into it.

Hollyw00d commented Aug 30, 2016

@zhoukai07 can you please comment with the error that Mac Terminal is giving you? Then I will look more into it.

@alexmiddeleer

This comment has been minimized.

Show comment
Hide comment
@alexmiddeleer

alexmiddeleer Oct 21, 2016

I'm seeing this issue on OSX 10.11.6 (El Capitan):

Alexs-MBP-3:desktop-fe alex$ nvm ls
         v4.4.0  
         v6.4.0  
         v6.8.0  
->       v6.9.1  
         system  
default -> v6.8 (-> v6.8.0)
node -> stable (-> v6.9.1) (default)
stable -> 6.9 (-> v6.9.1) (default)
iojs -> N/A (default)
lts/* -> lts/argon (-> N/A)
lts/argon -> v4.6.1 (-> N/A)
lts/boron -> v6.9.1
Alexs-MBP-3:desktop-fe alex$ nvm use
Found '/Users/alex/proj/desktop-fe/.nvmrc' with version <v6.9.0>
N/A: version "N/A" is not yet installed.

You need to run "nvm install N/A" to install it before using it.

alexmiddeleer commented Oct 21, 2016

I'm seeing this issue on OSX 10.11.6 (El Capitan):

Alexs-MBP-3:desktop-fe alex$ nvm ls
         v4.4.0  
         v6.4.0  
         v6.8.0  
->       v6.9.1  
         system  
default -> v6.8 (-> v6.8.0)
node -> stable (-> v6.9.1) (default)
stable -> 6.9 (-> v6.9.1) (default)
iojs -> N/A (default)
lts/* -> lts/argon (-> N/A)
lts/argon -> v4.6.1 (-> N/A)
lts/boron -> v6.9.1
Alexs-MBP-3:desktop-fe alex$ nvm use
Found '/Users/alex/proj/desktop-fe/.nvmrc' with version <v6.9.0>
N/A: version "N/A" is not yet installed.

You need to run "nvm install N/A" to install it before using it.
@ljharb

This comment has been minimized.

Show comment
Hide comment
@ljharb

ljharb Oct 21, 2016

Collaborator

@alexmiddeleer what does nvm debug print out?

Collaborator

ljharb commented Oct 21, 2016

@alexmiddeleer what does nvm debug print out?

@alexmiddeleer

This comment has been minimized.

Show comment
Hide comment
@alexmiddeleer

alexmiddeleer Oct 21, 2016

@ljharb

Alexs-MacBook-Pro-3:desktop-fe alex$ nvm debug
nvm --version: v0.31.4
$SHELL: /bin/bash
$HOME: /Users/alex
$NVM_DIR: '$HOME/.nvm'
$PREFIX: ''
$NPM_CONFIG_PREFIX: ''
nvm current: v6.9.1
which node: $NVM_DIR/versions/node/v6.9.1/bin/node
which iojs: 
which npm: $NVM_DIR/versions/node/v6.9.1/bin/npm
npm config get prefix: $NVM_DIR/versions/node/v6.9.1
npm root -g: $NVM_DIR/versions/node/v6.9.1/lib/node_modules

alexmiddeleer commented Oct 21, 2016

@ljharb

Alexs-MacBook-Pro-3:desktop-fe alex$ nvm debug
nvm --version: v0.31.4
$SHELL: /bin/bash
$HOME: /Users/alex
$NVM_DIR: '$HOME/.nvm'
$PREFIX: ''
$NPM_CONFIG_PREFIX: ''
nvm current: v6.9.1
which node: $NVM_DIR/versions/node/v6.9.1/bin/node
which iojs: 
which npm: $NVM_DIR/versions/node/v6.9.1/bin/npm
npm config get prefix: $NVM_DIR/versions/node/v6.9.1
npm root -g: $NVM_DIR/versions/node/v6.9.1/lib/node_modules
@ljharb

This comment has been minimized.

Show comment
Hide comment
@ljharb

ljharb Oct 21, 2016

Collaborator

@alexmiddeleer can you file a new issue with this info? That should work fine, as long as $HOME isn't a symlink, and there's no device mounting going on, and nvm wasn't installed by homebrew.

Collaborator

ljharb commented Oct 21, 2016

@alexmiddeleer can you file a new issue with this info? That should work fine, as long as $HOME isn't a symlink, and there's no device mounting going on, and nvm wasn't installed by homebrew.

@ankit-prgmr

This comment has been minimized.

Show comment
Hide comment
@ankit-prgmr

ankit-prgmr Feb 2, 2017

I have used nvm to install node version 6.9.5. But when I run the command nvm -ls , why is it showing this lts/argon -> v4.7.3 (->N/A)?
screenshot from 2017-02-02 13-25-59

ankit-prgmr commented Feb 2, 2017

I have used nvm to install node version 6.9.5. But when I run the command nvm -ls , why is it showing this lts/argon -> v4.7.3 (->N/A)?
screenshot from 2017-02-02 13-25-59

@ljharb

This comment has been minimized.

Show comment
Hide comment
@ljharb

ljharb Feb 2, 2017

Collaborator

@ankit-prgmr because the "argon" LTS is 4.7.3, and you don't have that installed. You only have "boron" installed.

Collaborator

ljharb commented Feb 2, 2017

@ankit-prgmr because the "argon" LTS is 4.7.3, and you don't have that installed. You only have "boron" installed.

@ankit-prgmr

This comment has been minimized.

Show comment
Hide comment
@ankit-prgmr

ankit-prgmr Feb 2, 2017

@ljharb Thanks for responding. So it is only showing the LTS version for argon available, right? Doesn't mean that I have some parts of it in my system? (I mean the leftover files after uninstall)

ankit-prgmr commented Feb 2, 2017

@ljharb Thanks for responding. So it is only showing the LTS version for argon available, right? Doesn't mean that I have some parts of it in my system? (I mean the leftover files after uninstall)

@ljharb

This comment has been minimized.

Show comment
Hide comment
@ljharb

ljharb Feb 2, 2017

Collaborator

You don't have anything in your system; every time nvm makes a network call it looks up what the LTS versions are and stores that as aliases. You can nvm unalias lts/argon if you want, but every network call nvm makes will restore it.

I do see that you're not using the latest nvm - a bug was fixed that makes lts/* point to argon instead of boron by mistake. Rerun the install script in the readme and that will be fixed.

Collaborator

ljharb commented Feb 2, 2017

You don't have anything in your system; every time nvm makes a network call it looks up what the LTS versions are and stores that as aliases. You can nvm unalias lts/argon if you want, but every network call nvm makes will restore it.

I do see that you're not using the latest nvm - a bug was fixed that makes lts/* point to argon instead of boron by mistake. Rerun the install script in the readme and that will be fixed.

@ankit-prgmr

This comment has been minimized.

Show comment
Hide comment
@ankit-prgmr

ankit-prgmr Feb 3, 2017

@ljharb Cool. Thanks for clearing it to me 👍 :)

ankit-prgmr commented Feb 3, 2017

@ljharb Cool. Thanks for clearing it to me 👍 :)

@twu781

This comment has been minimized.

Show comment
Hide comment
@twu781

twu781 Apr 26, 2017

Similar problem. I am new to react native so I have no idea what is going on. I tried downloading everything per the instructions provided by the website but I keep getting this error.

N/A: version "N/A -> N/A" is not yet installed.
You need to run "nvm install N/A" to install it before using it.

when I typed in nvm ls

Tong:~ tongwu$ nvm ls
       v0.10.48
         v7.8.0
         v7.9.0
->       system
default -> nod (-> N/A)
node -> stable (-> v7.9.0) (default)
stable -> 7.9 (-> v7.9.0) (default)
iojs -> N/A (default)
lts/* -> lts/boron (-> N/A)
lts/argon -> v4.8.2 (-> N/A)
lts/boron -> v6.10.2 (-> N/A)

Also this:

nvm --version: v0.33.1
$SHELL: /bin/bash
$HOME: /Users/tongwu
$NVM_DIR: '$HOME/.nvm'
$PREFIX: ''
$NPM_CONFIG_PREFIX: ''
$NVM_NODEJS_ORG_MIRROR: 'https://nodejs.org/dist'
$NVM_IOJS_ORG_MIRROR: 'https://iojs.org/dist'
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
Tong:~ tongwu$ bash --version
GNU bash, version 3.2.57(1)-release (x86_64-apple-darwin16)
Copyright (C) 2007 Free Software Foundation, Inc.
Tong:~ tongwu$ run
-bash: run: command not found
Tong:~ tongwu$ ~/.bashrc
-bash: /Users/tongwu/.bashrc: No such file or directory
Tong:~ tongwu$ 

twu781 commented Apr 26, 2017

Similar problem. I am new to react native so I have no idea what is going on. I tried downloading everything per the instructions provided by the website but I keep getting this error.

N/A: version "N/A -> N/A" is not yet installed.
You need to run "nvm install N/A" to install it before using it.

when I typed in nvm ls

Tong:~ tongwu$ nvm ls
       v0.10.48
         v7.8.0
         v7.9.0
->       system
default -> nod (-> N/A)
node -> stable (-> v7.9.0) (default)
stable -> 7.9 (-> v7.9.0) (default)
iojs -> N/A (default)
lts/* -> lts/boron (-> N/A)
lts/argon -> v4.8.2 (-> N/A)
lts/boron -> v6.10.2 (-> N/A)

Also this:

nvm --version: v0.33.1
$SHELL: /bin/bash
$HOME: /Users/tongwu
$NVM_DIR: '$HOME/.nvm'
$PREFIX: ''
$NPM_CONFIG_PREFIX: ''
$NVM_NODEJS_ORG_MIRROR: 'https://nodejs.org/dist'
$NVM_IOJS_ORG_MIRROR: 'https://iojs.org/dist'
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
Tong:~ tongwu$ bash --version
GNU bash, version 3.2.57(1)-release (x86_64-apple-darwin16)
Copyright (C) 2007 Free Software Foundation, Inc.
Tong:~ tongwu$ run
-bash: run: command not found
Tong:~ tongwu$ ~/.bashrc
-bash: /Users/tongwu/.bashrc: No such file or directory
Tong:~ tongwu$ 
@ljharb

This comment has been minimized.

Show comment
Hide comment
@ljharb

ljharb Apr 26, 2017

Collaborator

@twu You mistyped nvm install node as nvm install nod before. Try nvm alias default node.

Collaborator

ljharb commented Apr 26, 2017

@twu You mistyped nvm install node as nvm install nod before. Try nvm alias default node.

@twu781

This comment has been minimized.

Show comment
Hide comment
@twu781

twu781 Apr 26, 2017

@ljharb I tried nvm alias default node and got this Tong:~ tongwu$ nvm alias default node default -> node (-> v7.9.0) which I assume is good. Then I tried to install npm install -g react-native-cli but it didn't work so I tried curl -0 -L https://npmjs.org/install.sh | sudo sh. which resulted in series of downloads and the words It worked. However, when I tried to create a new project react-native init NewProject it gave me this

Installing react-native...
Consider installing yarn to make this faster: https://yarnpkg.com module.js:472
    throw err;
    ^
Error: Cannot find module 'semver'
    at Function.Module._resolveFilename (module.js:470:15)
    at Function.Module._load (module.js:418:25)
    at Module.require (module.js:498:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (/usr/local/lib/node_modules/npm/lib/utils/unsupported.js:2:14)
    at Module._compile (module.js:571:32)
    at Object.Module._extensions..js (module.js:580:10)
    at Module.load (module.js:488:32)
    at tryModuleLoad (module.js:447:12)
    at Function.Module._load (module.js:439:3)
{ Error: Command failed: npm install --save --save-exact react-native
    at checkExecSyncError (child_process.js:481:13)
    at execSync (child_process.js:521:13)
    at run (/usr/local/lib/node_modules/react-native-cli/index.js:294:5)
//other stuff

which ends with

 stderr: null,
  stdout: null,
  pid: 24098,
  output: [ null, null, null ],
  signal: null,
  status: 1 }
Command `npm install --save --save-exact react-native` failed.

twu781 commented Apr 26, 2017

@ljharb I tried nvm alias default node and got this Tong:~ tongwu$ nvm alias default node default -> node (-> v7.9.0) which I assume is good. Then I tried to install npm install -g react-native-cli but it didn't work so I tried curl -0 -L https://npmjs.org/install.sh | sudo sh. which resulted in series of downloads and the words It worked. However, when I tried to create a new project react-native init NewProject it gave me this

Installing react-native...
Consider installing yarn to make this faster: https://yarnpkg.com module.js:472
    throw err;
    ^
Error: Cannot find module 'semver'
    at Function.Module._resolveFilename (module.js:470:15)
    at Function.Module._load (module.js:418:25)
    at Module.require (module.js:498:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (/usr/local/lib/node_modules/npm/lib/utils/unsupported.js:2:14)
    at Module._compile (module.js:571:32)
    at Object.Module._extensions..js (module.js:580:10)
    at Module.load (module.js:488:32)
    at tryModuleLoad (module.js:447:12)
    at Function.Module._load (module.js:439:3)
{ Error: Command failed: npm install --save --save-exact react-native
    at checkExecSyncError (child_process.js:481:13)
    at execSync (child_process.js:521:13)
    at run (/usr/local/lib/node_modules/react-native-cli/index.js:294:5)
//other stuff

which ends with

 stderr: null,
  stdout: null,
  pid: 24098,
  output: [ null, null, null ],
  signal: null,
  status: 1 }
Command `npm install --save --save-exact react-native` failed.

@ljharb

This comment has been minimized.

Show comment
Hide comment
@ljharb

ljharb Apr 26, 2017

Collaborator

You have to nvm use first also, or restart your terminal.

Collaborator

ljharb commented Apr 26, 2017

You have to nvm use first also, or restart your terminal.

@twu781

This comment has been minimized.

Show comment
Hide comment
@twu781

twu781 Apr 27, 2017

I got this when I tried nvm use after restarting the terminal

No .nvmrc file found

Node Version Manager

Note: <version> refers to any version-like string nvm understands. This includes:
  - full or partial version numbers, starting with an optional "v" (0.10, v0.1.2, v1)
  - default (built-in) aliases: node, stable, unstable, iojs, system
  - custom aliases you define with `nvm alias foo`

twu781 commented Apr 27, 2017

I got this when I tried nvm use after restarting the terminal

No .nvmrc file found

Node Version Manager

Note: <version> refers to any version-like string nvm understands. This includes:
  - full or partial version numbers, starting with an optional "v" (0.10, v0.1.2, v1)
  - default (built-in) aliases: node, stable, unstable, iojs, system
  - custom aliases you define with `nvm alias foo`
@ljharb

This comment has been minimized.

Show comment
Hide comment
@ljharb

ljharb Apr 27, 2017

Collaborator

hmm, after nvm alias default node, nvm use should use the latest installed node version.

Collaborator

ljharb commented Apr 27, 2017

hmm, after nvm alias default node, nvm use should use the latest installed node version.

@twu781

This comment has been minimized.

Show comment
Hide comment
@twu781

twu781 Apr 27, 2017

which is why I am very confused. Thanks for trying though.

twu781 commented Apr 27, 2017

which is why I am very confused. Thanks for trying though.

@ljharb

This comment has been minimized.

Show comment
Hide comment
@ljharb

ljharb Apr 27, 2017

Collaborator

@twu781 if you do nvm use default what happens?

Collaborator

ljharb commented Apr 27, 2017

@twu781 if you do nvm use default what happens?

@twu781

This comment has been minimized.

Show comment
Hide comment
@twu781

twu781 Apr 27, 2017

I got Tong:~ tongwu$ nvm use default Now using node v7.9.0 (npm v4.2.0)

twu781 commented Apr 27, 2017

I got Tong:~ tongwu$ nvm use default Now using node v7.9.0 (npm v4.2.0)

@twu781

This comment has been minimized.

Show comment
Hide comment
@twu781

twu781 Apr 27, 2017

when I try to make a new project it says npm WARN react-native@0.43.4 requires a peer of react@16.0.0-alpha.6 but none was installed. at one point.
Now it allows me to initialize a new project but I get this when I try to generate the simulator Command `run-ios` unrecognized. Make sure that you have run `npm install` and that you are inside a react-native project. even though I had already ran

Tong:~ tongwu$ cd AwesomeProject
Tong:AwesomeProject tongwu$ react-native run-ios 

twu781 commented Apr 27, 2017

when I try to make a new project it says npm WARN react-native@0.43.4 requires a peer of react@16.0.0-alpha.6 but none was installed. at one point.
Now it allows me to initialize a new project but I get this when I try to generate the simulator Command `run-ios` unrecognized. Make sure that you have run `npm install` and that you are inside a react-native project. even though I had already ran

Tong:~ tongwu$ cd AwesomeProject
Tong:AwesomeProject tongwu$ react-native run-ios 
@ljharb

This comment has been minimized.

Show comment
Hide comment
@ljharb

ljharb Apr 27, 2017

Collaborator

Both of those warnings are part of the project you're using, or npm - not from nvm. Once npm and node work, nvm is not involved.

Collaborator

ljharb commented Apr 27, 2017

Both of those warnings are part of the project you're using, or npm - not from nvm. Once npm and node work, nvm is not involved.

@jebog

This comment has been minimized.

Show comment
Hide comment
@jebog

jebog Jul 23, 2017

nvm alias default system work for me on macOS Sierra with Homebrew

jebog commented Jul 23, 2017

nvm alias default system work for me on macOS Sierra with Homebrew

@parifuture

This comment has been minimized.

Show comment
Hide comment
@parifuture

parifuture Jul 26, 2017

I installed the latest version of node using nvm

nvm install node 8

Once done run

nvm current

then list all versions of nvm by running

nvm ls

This will give you a list of all installed version of node on ur machine. And one of them will be default for me it was version 6, but since I already had started using newer function I was constently getting errors. In the end I ran

nvm alias default node

And once done the default version was moved to 8.2.1

parifuture commented Jul 26, 2017

I installed the latest version of node using nvm

nvm install node 8

Once done run

nvm current

then list all versions of nvm by running

nvm ls

This will give you a list of all installed version of node on ur machine. And one of them will be default for me it was version 6, but since I already had started using newer function I was constently getting errors. In the end I ran

nvm alias default node

And once done the default version was moved to 8.2.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment