Yarn Set Node Version [2021] -
If your goal was to change the itself (which is common for "setting versions" within a project), use the yarn set version command. To use the latest stable version (Berry/4.x): yarn set version berry Use code with caution. To use a specific version: yarn set version 3.6.4 Use code with caution.
yarn set node version 20.10.0 --only-if-needed yarn set node version
nvm use 16 yarn install
You must use an external tool like nvm (Node Version Manager) or n before running Yarn. If your goal was to change the itself