Skip to content

nvm alias node 'lts/*' works, but then it can't be reset via nvm unalias node. #2122

@ksze

Description

@ksze

Operating system and version:

OS: Pop!_OS 19.10 (which is very similar to Ubuntu 19.10)
nvm version: 0.35.1

nvm debug output:

nvm --version: v0.35.1
$SHELL: /usr/bin/zsh
$SHLVL: 1
${HOME}: /home/kal
${NVM_DIR}: '${HOME}/.nvm'
${PATH}: ${NVM_DIR}/versions/node/v12.13.0/bin:${HOME}/.pyenv/shims:${HOME}/.local/bin:${HOME}/.cargo/bin:${HOME}/.pyenv/plugins/pyenv-virtualenv/shims:${HOME}/.pyenv/shims:${HOME}/.pyenv/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
$PREFIX: ''
${NPM_CONFIG_PREFIX}: ''
$NVM_NODEJS_ORG_MIRROR: ''
$NVM_IOJS_ORG_MIRROR: ''
shell version: 'zsh 5.7.1 (x86_64-ubuntu-linux-gnu)'
uname -a: 'Linux 5.3.0-20-generic #21+system76~1572304854~19.10~8caa3e6-Ubuntu SMP Tue Oct 29 00:4 x86_64 x86_64 x86_64 GNU/Linux'
OS version: Ubuntu 19.10  
curl: /usr/bin/curl, curl 7.65.3 (x86_64-pc-linux-gnu) libcurl/7.65.3 OpenSSL/1.1.1c zlib/1.2.11 libidn2/2.2.0 libpsl/0.20.2 (+libidn2/2.0.5) libssh/0.9.0/openssl/zlib nghttp2/1.39.2 librtmp/2.3
wget: /usr/bin/wget, GNU Wget 1.20.3 built on linux-gnu.
git: /usr/bin/git, git version 2.24.0
ls: cannot access 'grep:': No such file or directory
grep: grep: aliased to grep  --color=auto --exclude-dir={.bzr,CVS,.git,.hg,.svn} (grep --color=auto --exclude-dir={.bzr,CVS,.git,.hg,.svn}), grep (GNU grep) 3.3
awk: /usr/bin/awk, awk: not an option: --version
sed: /usr/bin/sed, sed (GNU sed) 4.7
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.225-235f
nvm current: v12.13.0
which node: ${NVM_DIR}/versions/node/v12.13.0/bin/node
which iojs: iojs not found
which npm: ${NVM_DIR}/versions/node/v12.13.0/bin/npm
npm config get prefix: ${NVM_DIR}/versions/node/v12.13.0
npm root -g: ${NVM_DIR}/versions/node/v12.13.0/lib/node_modules

nvm ls output:

->     v12.13.0
        v13.1.0
node -> lts/* (-> v12.13.0)
stable -> 13.1 (-> v13.1.0) (default)
iojs -> N/A (default)
unstable -> N/A (default)
lts/* -> lts/erbium (-> v12.13.0)
lts/argon -> v4.9.1 (-> N/A)
lts/boron -> v6.17.1 (-> N/A)
lts/carbon -> v8.16.2 (-> N/A)
lts/dubnium -> v10.17.0 (-> N/A)
lts/erbium -> v12.13.0

How did you install nvm?

Automatically installed by the zsh-nvm plugin.

What steps did you perform?

  1. Change the built-in node alias by doing nvm alias node 'lts/*'
  2. Try resetting the built-in node alias by doing nvm unalias node

What happened?

nvm tells me "node is a default (built-in) alias and cannot be deleted". I had to manually delete $NVM_DIR/alias/node

What did you expect to happen?

nvm resets the built-in node alias for me.

Is there anything in any of your profile files that modifies the PATH?

In .zprofile:

export PATH="$HOME/.pyenv/bin:$PATH"
export PATH="$HOME/.cargo/bin:$PATH"
export PATH="$HOME/.local/bin:$PATH"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions