jorgebucaran / nvm.fish

The Node.js version manager you'll adore, crafted just for Fish
https://git.io/nvm.fish
MIT License
2.08k stars 69 forks source link

Currently not works on MSYS2 (nvm: Unsupported operating system: "msys_nt-10.0-19044") #225

Closed wildtang closed 2 weeks ago

wildtang commented 2 weeks ago

I installed a fresh MSYS2 (msys2-x86_64-20240727.exe from https://www.msys2.org/) Installed nvm and installed two node versions. When I execute nvm list in bash, result below:

$ nvm list
->     v18.20.4
       v20.17.0
default -> 18.20.4 (-> v18.20.4)

Then I installed fish and fisher, nvm.fish, relaunched the MSYS2 window. Enter fish, nvm list shows nothing, nvm install will failed.

    ~> nvm list
    ▶ system

    ~> nvm install 18.20.4
    nvm: Unsupported operating system: "msys_nt-10.0-19044"

P.S. My OS is Windows 10 LTS 21H2 19044.4780.

Hope you can confirm this problem, Thanks a lot!

jorgebucaran commented 2 weeks ago

Thanks for the detailed report! Unfortunately, I don't have Windows, so it might be tricky for me to check this out. If you're able to help with a fix, that would be awesome

wildtang commented 2 weeks ago

OK, I tried to resolved this problem in another way by Google.

  1. fisher install edc/bass
  2. pacman -S python3 (bass needs python)
  3. Edit ~/.config/fish/config.fish, add line below
function nvm
  bass source $NVM_DIR/nvm.sh --no-use ';' nvm $argv
end

set -gx NVM_DIR ~/.nvm
nvm use default --silent
jorgebucaran commented 2 weeks ago

That is not nvm.fish