asdf-nodejs
asdf-nodejs copied to clipboard
asdf suggests nodejs version is not installed when actually yarn isn't
In migrating from nodejs 16 to 18, I get the following when trying to run a yarn command (e.g. yarn -v)
$ yarn -v
No preset version installed for command yarn
Please install a version by running one of the following:
asdf install nodejs 18.19.0
or add one of the following versions in your config file at /home/neale/dev/ecco/ecco/.tool-versions
nodejs 16.20.2
This is despite having done as instructed.
The issue was in fact that under nodejs 16, I have yarn installed and there is a yarn shim, but under nodejs 18, I don't have yarn installed.
Doing npm -g install yarn resolves the above error.