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

nvm is not compatible with the npm config "prefix" option #1621

Closed
pnahtanoj opened this issue Sep 28, 2017 · 4 comments
Closed

nvm is not compatible with the npm config "prefix" option #1621

pnahtanoj opened this issue Sep 28, 2017 · 4 comments

Comments

@pnahtanoj
Copy link

  • Operating system and version:
    DISTRIB_ID=Ubuntu
    DISTRIB_RELEASE=14.04

  • nvm debug output:

jenkins@jenkins:~$ nvm debug
nvm --version: v0.33.4
$SHELL: /bin/bash
$HOME: /var/lib/jenkins
$NVM_DIR: '$HOME/.nvm'
$PREFIX: ''
$NPM_CONFIG_PREFIX: ''
$NVM_NODEJS_ORG_MIRROR: ''
$NVM_IOJS_ORG_MIRROR: ''
shell version: 'GNU bash, version 4.3.11(1)-release (x86_64-pc-linux-gnu)'
uname -a: 'Linux 3.13.0-48-generic #80-Ubuntu SMP Thu Mar 12 11:16:15 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux'
OS version: Ubuntu 14.04.2 LTS  
curl: /usr/bin/curl, curl 7.35.0 (x86_64-pc-linux-gnu) libcurl/7.35.0 OpenSSL/1.0.1f zlib/1.2.8 libidn/1.28 librtmp/2.3
wget: /usr/bin/wget, GNU Wget 1.15 built on linux-gnu.
git: /usr/bin/git, git version 1.9.1
nvm current: system
which node: /usr/bin/node
which iojs: 
which npm: /usr/bin/npm
npm config get prefix: /usr
npm root -g: /usr/lib/node_modules
  • nvm ls output:
jenkins@jenkins:~$ nvm ls
         v7.8.0
         v8.2.1
->       system
default -> 7.8.0 (-> v7.8.0)
node -> stable (-> v8.2.1) (default)
stable -> 8.2 (-> v8.2.1) (default)
iojs -> N/A (default)
lts/* -> lts/boron (-> N/A)
lts/argon -> v4.8.4 (-> N/A)
lts/boron -> v6.11.3 (-> N/A)

Downloading and installing node v8.2.1...
Downloading https://nodejs.org/dist/v8.2.1/node-v8.2.1-linux-x64.tar.xz...
######################################################################## 100.0%
Computing checksum with sha256sum
Checksums matched!
nvm is not compatible with the npm config "prefix" option: currently set to "/mnt/data/jenkins/.nvm/versions/node/v8.2.1"
Run npm config delete prefix or nvm use --delete-prefix v8.2.1 to unset it.

  • What did you expect to happen?

node 8.2.1. to become active

  • Is there anything in any of your profile files (.bashrc, .bash_profile, .zshrc, etc) that modifies the PATH?
    First line of .bashrc: export PATH="$PATH:/usr/bin/:/bin"
@ljharb
Copy link
Member

ljharb commented Sep 29, 2017

Do you have a ~/.npmrc file that has a "prefix" line in it?

I notice /mnt in your path; is $NVM_DIR a symlink?

@pnahtanoj
Copy link
Author

It IS a symlink. Drat, I thought I'd checked that. I won't be able to verify the fix till later, but I'll come back and close the ticket once I do. Thanks for the quick response!

@ljharb
Copy link
Member

ljharb commented Sep 29, 2017

In that case, this is basically a duplicate of #617

@pnahtanoj
Copy link
Author

Finally verified, 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