Webpacker: yarn upgrade : The engine "yarn" is incompatible with this module

Created on 4 Sep 2017  ·  4Comments  ·  Source: rails/webpacker

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.

Most helpful comment

@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)

All 4 comments

@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.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

vtno picture vtno  ·  3Comments

amandapouget picture amandapouget  ·  3Comments

naps62 picture naps62  ·  3Comments

ytbryan picture ytbryan  ·  3Comments

itay-grudev picture itay-grudev  ·  3Comments