jorgebucaran / nvm.fish

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

Need to reinstall node on session restart #208

Closed SleeplessOne1917 closed 1 year ago

SleeplessOne1917 commented 1 year ago

Thank you for making a version of nvm that works with fish.

After installing nvm.fish and using that to install the lts version of node, I can use node in that session. However, if I close my console and open it again, I can't use node (although I can still use nvm). My nvm node version lives at ~/.local/share/nvm/v18.16.0/bin. I'm sure I could adjust my config to include this directory in the path, but it would be nice if this was handled out of the box. Perhaps the link included in the path could change when nvm use <version> is called.

jorgebucaran commented 1 year ago

Glad to hear that nvm.fish is working for you!

Based on your issue, it seems like there may be some confusion around how to use nvm. Both the install and use commands only activate the specified Node version in the current session. If you want to set the default version for new shells, you need to set the nvm_default_version variable as described in nvm.fish#nvm_default_version.

Give that a try and let me know if it works for you.

SleeplessOne1917 commented 1 year ago

That worked. Thank you!