I have problem with asdf. I have already install nodejs latest.

asdf install nodejs latest ... asdf local nodejs latest / asdf global nodejs latest 

But if I try

yarn  No preset version installed for command yarn Please install a version by running one of the following: asdf install nodejs 18.0.0 or add one of the following versions in your config file at /Users/../project-name/.tool-versions nodejs 14.17.0 nodejs 19.0.1 

But my .tool-version in project structure already contains it:

nodejs 18.0.0 nodejs 19.0.1 

(For my project I need nodejs >= 18) I am using apple M1 chip.

1

2 Answers

This happens when you have yarn installed under a different version of node, but not the active one. As yarn is a package under the node version, so you need to (re)install yarn with the new active version of node:

npm install -g yarn 

Then it should work.

0

You need to set the local instance for asdf, using asdf local nodejs 19.0.1

0

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.