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 not compatible with prefix option" issue on Fedora 29 Silverblue #2029

Closed
john-gold opened this issue Apr 18, 2019 · 4 comments
Closed
Labels
needs followup We need some info or action from whoever filed this issue/PR.

Comments

@john-gold
Copy link

Hi, having the well known "prefix" problem, although there is no .npmrc present or even nodejs/npm installed on the system :(

  • Operating system and version:

    Fedora 29 Silverblue

  • nvm debug output:

    nvm --version: v0.34.0
    $SHELL: /bin/bash
    $SHLVL: 2
    $HOME: /home/logol
    $NVM_DIR: '$HOME/.nvm'
    $PATH: /usr/share/Modules/bin:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin
    $PREFIX: ''
    $NPM_CONFIG_PREFIX: ''
    $NVM_NODEJS_ORG_MIRROR: ''
    $NVM_IOJS_ORG_MIRROR: ''
    shell version: 'GNU bash, version 4.4.23(1)-release (x86_64-redhat-linux-gnu)'
    uname -a: 'Linux 5.0.7-200.fc29.x86_64 #1 SMP Mon Apr 8 15:40:59 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux'
    OS version: Fedora 29.20190416.0 (Workstation Edition)
    curl: /usr/bin/curl, curl 7.61.1 (x86_64-redhat-linux-gnu) libcurl/7.61.1 OpenSSL/1.1.1b zlib/1.2.11 brotli/1.0.5 libidn2/2.1.1 libpsl/0.20.2 (+libidn2/2.0.5) libssh/0.8.7/openssl/zlib nghttp2/1.34.0
    wget: /usr/bin/wget, GNU Wget 1.20.3 built on linux-gnu.
    git: /usr/bin/git, git version 2.20.1
    grep: /usr/bin/grep, grep (GNU grep) 3.1
    awk: /usr/bin/awk, GNU Awk 4.2.1, API: 2.0 (GNU MPFR 3.1.6-p2, GNU MP 6.1.2)
    sed: /usr/bin/sed, sed (GNU sed) 4.5
    cut: /usr/bin/cut, cut (GNU coreutils) 8.30
    basename: /usr/bin/basename, basename (GNU coreutils) 8.30
    rm: /usr/bin/rm, rm (GNU coreutils) 8.30
    mkdir: /usr/bin/mkdir, mkdir (GNU coreutils) 8.30
    xargs: /usr/bin/xargs, xargs (GNU findutils) 4.6.0
    nvm current: none
    which node: which: no node in (/usr/share/Modules/bin:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin)
    which iojs: which: no iojs in (/usr/share/Modules/bin:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin)
    which npm: which: no npm in (/usr/share/Modules/bin:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin)
    npm config get prefix: bash: npm: command not found
    npm root -g: bash: npm: command not found
  • nvm ls output:

    v11.14.0
    default -> node (-> v11.14.0)
    node -> stable (-> v11.14.0) (default)
    stable -> 11.14 (-> v11.14.0) (default)
    iojs -> N/A (default)
    unstable -> N/A (default)
    lts/* -> lts/dubnium (-> N/A)
    lts/argon -> v4.9.1 (-> N/A)
    lts/boron -> v6.17.1 (-> N/A)
    lts/carbon -> v8.16.0 (-> N/A)
    lts/dubnium -> v10.15.3 (-> N/A)
  • How did you install nvm? (e.g. install script in readme, Homebrew):

    Git install (but using Install & Update script leads to the same)

  • What steps did you perform?

nvm install node
  • What happened?
nvm is not compatible with the npm config "prefix" option: currently set to "/var/home/logol/.nvm/versions/node/v11.14.0"
Run `nvm use --delete-prefix v11.14.0 --silent` to unset it.
  • What did you expect to happen?
    nvm should not think there is a prefix set

  • Is there anything in any of your profile files (.bashrc, .bash_profile, .zshrc, etc) that modifies the PATH?

# .bashrc

# If not running interactively, don't do anything
[[ $- != *i* ]] && return

alias ls='ls --color=auto'
PS1='[\u@\h \W]\$ '

export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" 
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" 
@ljharb
Copy link
Member

ljharb commented Apr 19, 2019

Is your $HOME dir a symlink, or mounted from elsewhere?

@ljharb ljharb added the needs followup We need some info or action from whoever filed this issue/PR. label Apr 19, 2019
@john-gold
Copy link
Author

yes, the $HOME is a symlink to var/home

@ljharb
Copy link
Member

ljharb commented Apr 20, 2019

That’s the problem - nvm doesn’t support a symlink as the home or nvm dir. See #617.

@john-gold
Copy link
Author

okay thanks for the information, should have done a deeper research (will go for the temporary solution mentioned in your reference)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs followup We need some info or action from whoever filed this issue/PR.
Projects
None yet
Development

No branches or pull requests

2 participants