In a brand new project, if I do
➜ yarn upgrade
I get an incompatibility error :
yarn upgrade v0.24.5
[1/4] 🔍 Resolving packages...
[2/4] 🚚 Fetching packages...
error @rails/[email protected]: The engine "yarn" is incompatible with this module. Expected version ">=0.25.2".
error Found incompatible module
info Visit https://yarnpkg.com/en/docs/cli/upgrade for documentation about this command.
I tried to bundle update first, in case (and it updated webpacker to v.3.0.1), but it still fails.
@kikan You would need to bump up your yarn version so if installed with brew brew upgrade yarn or curl -o- -L https://yarnpkg.com/install.sh | bash - whatever works (https://yarnpkg.com/lang/en/docs/install/#mac-tab)
Ok, thanks 👍. I also managed to upgrade like this :
rm -rf node_modules
yarn
I received this error because my node (not yarn) was outdated (version 6.13). Upgrading and then running yarn resolved it for me.
I was also facing this issue. My package.json engines looks like this:
"engines": {
"node": "6.* || 8.* || >= 10.*"
},
i just made
"engines": {
"node": ">= 8.*"
},
And it worked.
Most helpful comment
@kikan You would need to bump up your yarn version so if installed with brew
brew upgrade yarnorcurl -o- -L https://yarnpkg.com/install.sh | bash- whatever works (https://yarnpkg.com/lang/en/docs/install/#mac-tab)