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

fish: Unknown command: node #194

Closed maxwassiljew closed 1 year ago

maxwassiljew commented 2 years ago

HI I got this weird behavior:

` 🕙 17:42:38 ❯ nvm install v16.16.0 Now using Node v16.16.0 (npm 8.11.0) ~/.local/share/nvm/v16.16.0/bin/node

~ 🕙 17:42:41 ❯ nvm install v16.17.0 realpath: Expected at least 1 args, got only 0 fish: Unknown command: node ~/.config/fish/functions/nvm.fish (line 225): command node --eval " console.log(process.version) console.log('$npm_version_default' ? '$npm_version_default': require('$npm_path/package.json').version) console.log(process.execPath.replace(require('os').homedir(), '~')) " ^ in function '_nvm_node_info' called on line 1 of file ~/.config/fish/functions/nvm.fish in command substitution called on line 135 of file ~/.config/fish/functions/nvm.fish in function 'nvm' with arguments 'install v16.17.0' Now using Node (npm )

~ 🕙 17:42:45 ❯ node -v fish: Unknown command: node

~ 🕙 17:42:57 ✖
`

jorgebucaran commented 2 years ago

Hi, @maxwassiljew. Fish version?

maxwassiljew commented 2 years ago

HI @jorgebucaran , sorry for incomplete information. This was fresh install using brew. fish, version 3.5.1

jorgebucaran commented 2 years ago

Are you on a Mac? M1?

Have you happened to install Node using brew?

Were you previously using nvm.sh? This tool is not supposed to be used along with nvm.sh. This is a standalone Node version manager for Fish. 🙏

Finally, could you show me what's in your config.fish? Just in case.

jorgebucaran commented 1 year ago

Ping @maxwassiljew

maxwassiljew commented 1 year ago

🙏 Thanks for pinging me. This issue goes out of my radar.

Yes, i'm on M1. On my first setup I installed nvm.sh. Then switch completely to fish and nvm.fish.

As you mention that this tool is not supposed to be used along with nvm.sh I think my issue is resolved by that. I will post my config.fish later today.