Problem/Motivation
While upgrading drupal core from 10.5.8 to 10.6.2 after running npm install I'm getting error error qified@0.5.2: The engine "node" is incompatible with this module. Expected version ">=20". Got "18.17.1"
error Found incompatible module.
Steps to reproduce
- Run the command lando composer update drupal/core drupal/core-recommended drupal/core-dev drupal/core-composer-scaffold twig/twig guzzlehttp/* masterminds/html5 pear/archive_tar simplesamlphp/*
- Run the command lando rebuild -y but in the npm install step while Fetching packages we got the error error qified@0.5.2: The engine "node" is incompatible with this module. Expected version ">=20". Got "18.17.1"
This is the issue https://git.drupalcode.org/project/drupal/-/commit/da80c87466e05a2301052... which is causing error.
Proposed resolution
Downgrade and pin to Stylelint 16.11.0 for 10.6.x.
Remaining tasks
User interface changes
Introduced terminology
API changes
Data model changes
Release notes snippet
Issue fork drupal-3566429
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
- 3566429-yarn-command-is
changes, plain diff MR !14286
Comments
Comment #2
cilefen commentedUpgrade Node on the system.
Comment #3
quietone commentedRestoring formatting
Comment #4
maheshv commentedUntil drupal core 10.5.8 we were just getting warning related to node but after upgrading to 10.6.0 we are getting error.
Error: After upgrading to drupal 10.6.0
yarn install v1.22.22
[1/5] Validating package.json...
[2/5] Resolving packages...
[3/5] Fetching packages...
error qified@0.5.2: The engine "node" is incompatible with this module. Expected version ">=20". Got "18.17.1"
error Found incompatible module.
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
[ExecStack] Exit code 1 Time 29.683s
[error] Executing frontend install failed.
Warning: during drupal core 10.5.8
yarn install v1.22.22
[1/5] Validating package.json...
[2/5] Resolving packages...
[3/5] Fetching packages...
warning qified@0.5.2: The engine "node" is incompatible with this module. Expected version ">=20". Got "18.17.1"
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
[4/5] Linking dependencies...
[5/5] Building fresh packages...
Done in 17.39s.
Comment #5
quietone commented@maheshv, I see you are using lando. Have you read their docs regarding Node, such as https://docs.lando.dev/plugins/node/#supported-versions?
Comment #6
longwavepackage.json in 10.6 does still specify Node 18 as a minimum so this feels like a bug:
We only bumped this to Node 20 in Drupal 11.
Comment #7
longwaveOn the other hand I'm not sure there's a lot we can do here without downgrading Stylelint:
I tried uninstalling and reinstalling Stylelint under Node 18 to see if the dependencies can be resolved differently, but I ended up with the same error. The only viable solution is to downgrade Stylelint to 16.11.0, newer versions eventually depend on
qifiedwhich requires Node 20.Node 18 is also end of life since April 2025.
We have two options:
Comment #8
longwaveLeaning towards the more conservative option of downgrading Stylelint, given that 10.6.x is supposed to be in maintenance. Anyone using these deps probably shouldn't be forced to upgrade NodeJS as that might have other side effects.
Unsure if there is a way we can prevent this in the future? Maybe we need a Node version manager in CI so we can always run on the correct version.
Comment #10
quietone commentedThe conservative approach does align with the idea of a maintenance minor. To test that I created an MR. Tagging for the next 10.6 release.
I agree with exploring ways to prevent this in the future.
Comment #11
longwaveLet's follow up with a way to prevent this from happening in Drupal 11 and beyond.
Comment #12
quietone commentedCreated the followup, #3566827: [ci] Add a job to check that yarn install succeeds on the minimum supported version
Comment #13
nicxvan commentedI keep confusing the title so I added some clarifications.
Comment #14
quietone commented@nicxvan, thanks. That was on my for today but I didn't get to it.
Comment #15
godotislateTested this locally with ddev and it looks good to me:
10.5.8
10.6.x
MR branch
Comment #17
longwaveCommitted and pushed b78010313c2 to 10.6.x. Thanks!