kaounKaoun
kaounKaoun

Reputation: 661

nvm not able to change the system node version using nvm

I am working on some remote linux server, where I want to set node v8.0.0. But it seems this has been set to use v0.10.35 and how much ever I try to use nvm use and set different node version, it doesn't work.

Here are the simple code and output:

jk@:$ nvm debug
nvm --version: v0.32.0
$SHELL: /bin/bash
$HOME: /home/jk
$NVM_DIR: '$HOME/.nvm'
$PREFIX: ''
$NPM_CONFIG_PREFIX: ''
nvm current: system
which node: /usr/bin/node
which iojs: which: no iojs in (/data/thirdparty/gcc-6.1.0/bin:/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin:$HOME/bin)
which npm: /usr/bin/npm
npm config get prefix: Error: ENOENT, stat '$NVM_DIR/versions/node/v8.0.0'
npm root -g: $NVM_DIR/versions/node/v8.0.0/lib/node_modules

jk@:~$ nvm list
         v6.1.0
         v6.6.0
         v8.0.0
->       system
default -> v8.0.0
system -> 8.0.0 (-> v8.0.0)
node -> stable (-> v8.0.0) (default)
stable -> 8.0 (-> v8.0.0) (default)
iojs -> N/A (default)
lts/* -> lts/argon (-> N/A)
lts/argon -> v4.8.7 (-> N/A)
lts/boron -> v6.12.2 (-> N/A)
lts/carbon -> v8.9.3 (-> N/A)
jk@:~$ node -v
v0.10.35
jk@:~$ nvm use 8.0.0
Now using node v8.0.0 (npm v1.4.28)
jk@:~$ node -v
v0.10.35

I checked my ./bashrc file etc, but completely clueless why nvm use doesn't working and which file is actually overwriting this.

Upvotes: 1

Views: 3707

Answers (1)

LJHarb
LJHarb

Reputation: 39314

(nvm maintainer here)

The npm config get prefix error in nvm debug is concerning; you may want to try nvm uninstall 8 && nvm install 8.

If you’re still having trouble, please file an issue on the git repo http://nvm.sh

Upvotes: 4

Related Questions