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 yarn@1.16.0
$ 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:...