Reputation: 685
I'm trying to install yarn on Ubuntu 18.04 using nvm and npm. The installation succeeds and shows that it's installed globally. The which
command points to the right directory as well, but the command can't be used by itself, or as yarn install
because the system tries to use /usr/bin/yarn
instead.
$ nvm which current
/home/[user]/.nvm/versions/node/v10.16.0/bin/node
$ npm install -g [email protected]
$ which yarn
/home/[user]/.nvm/versions/node/v10.16.0/bin/yarn
$ yarn
bash: /usr/bin/yarn: No such file or directory
$ echo $PATH
/home/[user]/.nvm/versions/node/v10.16.0/bin:/home/[user]/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/home/[user]/bin:...
Upvotes: 2
Views: 4215
Reputation: 685
It turns out the fix is to close the terminal and reopen a new terminal window.
Upvotes: 13