nvm-sh / nvm

Node Version Manager - POSIX-compliant bash script to manage multiple active node.js versions
MIT License
79.99k stars 8.01k forks source link

Can't update nvm 0.35.3 to 0.39.7 #3306

Closed kotenok2000 closed 8 months ago

kotenok2000 commented 8 months ago

Operating system and version:

ubuntu 22.04 wsl1

curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.3/install.sh | bash output:

```sh nvm debug nvm --version: v0.35.3 $SHELL: /bin/bash $SHLVL: 1 ${HOME}: /home/user ${NVM_DIR}: '${HOME}/.nvm' ${PATH}: ${HOME}/.local/bin:~/.local/bin/:${HOME}/.cargo/bin:/opt/cmdock-0.2.1/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/mnt/c/Program Files (x86)/NVIDIA Corporation/PhysX/Common:/mnt/c/Program Files/Common Files/Oracle/Java/javapath:/mnt/c/Program Files (x86)/Common Files/Oracle/Java/javapath:/mnt/c/Program Files (x86)/VMware/VMware Workstation/bin/:/mnt/c/ProgramData/scoop/shims:/mnt/c/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v12.0/bin:/mnt/c/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v12.0/libnvvp:/mnt/c/Windows/system32:/mnt/c/Windows:/mnt/c/Windows/System32/Wbem:/mnt/c/Windows/System32/WindowsPowerShell/v1.0/:/mnt/c/Windows/System32/OpenSSH/:/mnt/c/Program Files/NVIDIA Corporation/NVIDIA NvDLISR:/mnt/e/Program Files/WinMerge:/mnt/e/Program Files (x86)/FAHClient:/mnt/c/Users/frolo/loda/bin:/mnt/c/Users/frolo/.loda-rust:/mnt/c/ProgramData/chocolatey/bin:/mnt/e/new folder/sysinternalssuite/Contig.exe:/mnt/e/Program Files/FAHClient:/mnt/e/new folder/sysinternalssuite:/mnt/e/apacheant/bin:/mnt/e/Windows Kits/10/Windows Performance Toolkit/:/mnt/c/Program Files/dotnet/:/mnt/c/Program Files/Microsoft SQL Server/150/Tools/Binn/:/mnt/c/Program Files/Microsoft SQL Server/Client SDK/ODBC/170/Tools/Binn/:/mnt/c/Program Files/qemu:/mnt/c/Program Files/eSpeak NG/:/mnt/f/Strawberry/c/bin:/mnt/f/Strawberry/perl/site/bin:/mnt/f/Strawberry/perl/bin:/mnt/c/Program Files/Wolfram Research/WolframScript/:/mnt/c/Program Files (x86)/dotnet/:/mnt/c/Program Files/MiKTeX/miktex/bin/x64/:/mnt/c/Program Files/TortoiseSVN/bin:/mnt/c/Program Files/PowerShell/7/:/mnt/c/Program Files/Process Lasso/:/mnt/c/Program Files (x86)/GnuPG/bin:/mnt/c/Program Files/Cloudflare/Cloudflare WARP/:/mnt/c/Program Files/Go/bin:/mnt/c/Program Files/Calibre2/:/mnt/c/Program Files/Git/cmd:/mnt/c/Program Files/Git/mingw64/bin:/mnt/c/Program Files/Git/usr/bin:/mnt/c/Users/frolo/AppData/Local/Programs/Python/Python312/Scripts/:/mnt/c/Users/frolo/AppData/Local/Programs/Python/Python312/:/mnt/c/Users/frolo/scoop/shims:/mnt/c/Users/frolo/.cargo/bin:/mnt/f/Ruby31-x64/bin:/mnt/c/Users/frolo/AppData/Local/Microsoft/WindowsApps:/mnt/c/tools/msys64:/mnt/e/Program Files/FAHClient:/mnt/c/Users/frolo/.dotnet/tools:/mnt/c/Users/frolo/.dotnet/tools:/mnt/c/Users/frolo/AppData/Roaming/Programs/Zero Install:/mnt/c/Users/frolo/.dotnet/tools:/mnt/c/Program Files (x86)/Nmap:/mnt/c/Users/frolo/go/bin:/mnt/c/Users/frolo/AppData/Roaming/mips:/mnt/c/Users/frolo/AppData/Roaming/mips/mips/bin:/mnt/c/Users/frolo/.dotnet/tools:/mnt/c/Users/frolo/go/bin:/snap/bin:${HOME}/opt/OpenMPI/bin $PREFIX: '' ${NPM_CONFIG_PREFIX}: '' $NVM_NODEJS_ORG_MIRROR: '' $NVM_IOJS_ORG_MIRROR: '' shell version: 'GNU bash, version 5.1.16(1)-release (x86_64-pc-linux-gnu)' uname -a: 'Linux 4.4.0-22621-Microsoft #2506-Microsoft Fri Jan 01 08:00:00 PST 2016 x86_64 x86_64 x86_64 GNU/Linux' OS version: Ubuntu 22.04.4 LTS curl: /usr/bin/curl, curl 7.81.0 (x86_64-pc-linux-gnu) libcurl/7.81.0 OpenSSL/3.0.2 zlib/1.2.11 brotli/1.0.9 zstd/1.4.8 libidn2/2.3.2 libpsl/0.21.0 (+libidn2/2.3.2) libssh/0.9.6/openssl/zlib nghttp2/1.43.0 librtmp/2.3 OpenLDAP/2.5.16 wget: /usr/bin/wget, GNU Wget 1.21.2 built on linux-gnu. git: /usr/bin/git, git version 2.34.1 grep: /usr/bin/grep (grep --color=auto), grep (GNU grep) 3.7 awk: /usr/bin/awk, GNU Awk 5.1.0, API: 3.0 (GNU MPFR 4.1.0, GNU MP 6.2.1) sed: /usr/bin/sed, sed (GNU sed) 4.8 cut: /usr/bin/cut, cut (GNU coreutils) 8.32 basename: /usr/bin/basename, basename (GNU coreutils) 8.32 rm: /usr/bin/rm, rm (GNU coreutils) 8.32 mkdir: /usr/bin/mkdir, mkdir (GNU coreutils) 8.32 xargs: /usr/bin/xargs, xargs (GNU findutils) 4.8.0 nvm current: none which node: which iojs: which npm: npm config get prefix: Command 'npm' not found, but can be installed with: sudo apt install npm npm root -g: Command 'npm' not found, but can be installed with: sudo apt install npm ```

nvm ls output:

```sh nvm ls N/A iojs -> N/A (default) node -> stable (-> N/A) (default) unstable -> N/A (default) ```

How did you install nvm?

curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.3/install.sh | bash

What steps did you perform?

I tried to update nvm with wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash

What happened?

user@DESKTOP-P57624Q:~$ wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash => nvm is already installed in /home/user/.nvm, trying to update using git => => Compressing and cleaning up git repository

=> nvm source string already in /home/user/.bashrc => bash_completion source string already in /home/user/.bashrc => Close and reopen your terminal to start using nvm or run the following to use it now:

export NVM_DIR="$HOME/.nvm" [ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" # This loads nvm [ -s "$NVM_DIR/bash_completion" ] && . "$NVM_DIR/bash_completion" # This loads nvm bash_completion user@DESKTOP-P57624Q:~$ nvm --version 0.35.3

What did you expect to happen?

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

ljharb commented 8 months ago

Did you close and reopen your terminal, as the instructions explicitly tell you to do?