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

Command icon 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:

Comments

maheshv created an issue. See original summary.

cilefen’s picture

Priority: Major » Normal

Upgrade Node on the system.

quietone’s picture

Issue summary: View changes

Restoring formatting

maheshv’s picture

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

quietone’s picture

@maheshv, I see you are using lando. Have you read their docs regarding Node, such as https://docs.lando.dev/plugins/node/#supported-versions?

longwave’s picture

package.json in 10.6 does still specify Node 18 as a minimum so this feels like a bug:

  "engines": {
    "yarn": ">= 1.6",
    "node": ">= 18.0"
  },

We only bumped this to Node 20 in Drupal 11.

longwave’s picture

Title: Npm command is breaking after drupal 10.6.0 update » Yarn command is breaking after Drupal 10.6.0 update
Component: other » javascript
Category: Support request » Bug report

On the other hand I'm not sure there's a lot we can do here without downgrading Stylelint:

$ yarn why qified
yarn why v1.22.22
[1/4] Why do we have the module "qified"...?
[2/4] Initialising dependency graph...
[3/4] Finding dependency...
[4/4] Calculating file sizes...
=> Found "qified@0.5.3"
info Reasons this module exists
   - "stylelint#file-entry-cache#flat-cache#cacheable" depends on it
   - Hoisted from "stylelint#file-entry-cache#flat-cache#cacheable#qified"

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 qified which requires Node 20.

Node 18 is also end of life since April 2025.

We have two options:

  1. Retrospectively update the JavaScript dev dependency requirements for 10.6 to Node 20, and bump the engine requirement in package.json to match reality.
  2. Downgrade and pin to Stylelint 16.11.0 for 10.6.x.
longwave’s picture

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

quietone’s picture

Issue summary: View changes
Status: Active » Needs review
Issue tags: +10.6.3 release priority

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

longwave’s picture

Issue tags: +Needs followup

Let's follow up with a way to prevent this from happening in Drupal 11 and beyond.

quietone’s picture

Title: Yarn command is breaking after Drupal 10.6.0 update » Update to 10.6.0 fails due to node incompatibility
Issue tags: -Needs followup +10.6.0 update
nicxvan’s picture

Title: Update to 10.6.0 fails due to node incompatibility » Update to 10.6.0 fails due to nodejs version incompatibility

I keep confusing the title so I added some clarifications.

quietone’s picture

@nicxvan, thanks. That was on my for today but I didn't get to it.

godotislate’s picture

Status: Needs review » Reviewed & tested by the community

Tested this locally with ddev and it looks good to me:

10.5.8

  1. ddev nvm install 18
  2. ddev nvm use 18
  3. git checkout 10.5.8
  4. ddev ssh
  5. cd core
  6. yarn install
    yarn install v1.22.22
    [1/5] Validating package.json...
    [2/5] Resolving packages...
    [3/5] Fetching packages...
    [4/5] Linking dependencies...
    warning Workspaces can only be enabled in private projects.
    warning Workspaces can only be enabled in private projects.
    warning Workspaces can only be enabled in private projects.
    warning Workspaces can only be enabled in private projects.
    warning Workspaces can only be enabled in private projects.
    warning Workspaces can only be enabled in private projects.
    warning Workspaces can only be enabled in private projects.
    warning Workspaces can only be enabled in private projects.
    warning Workspaces can only be enabled in private projects.
    warning Workspaces can only be enabled in private projects.
    warning Workspaces can only be enabled in private projects.
    warning Workspaces can only be enabled in private projects.
    warning Workspaces can only be enabled in private projects.
    warning Workspaces can only be enabled in private projects.
    warning Workspaces can only be enabled in private projects.
    warning Workspaces can only be enabled in private projects.
    warning Workspaces can only be enabled in private projects.
    warning Workspaces can only be enabled in private projects.
    warning Workspaces can only be enabled in private projects.
    warning Workspaces can only be enabled in private projects.
    warning Workspaces can only be enabled in private projects.
    warning Workspaces can only be enabled in private projects.
    warning Workspaces can only be enabled in private projects.
    warning Workspaces can only be enabled in private projects.
    [5/5] Building fresh packages...
    Done in 2.63s.
        
  7. exit

10.6.x

  1. git checkout 10.6.x
  2. ddev ssh
  3. cd core
  4. yarn install
    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.20.8"
      error Found incompatible module.
      info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
        
  5. exit

MR branch

  1. git checkout 3566429-yarn-command-is
  2. ddev ssh
  3. cd core
  4. yarn install
    yarn install v1.22.22
    [1/5] Validating package.json...
    [2/5] Resolving packages...
    [3/5] Fetching packages...
    [4/5] Linking dependencies...
    warning Workspaces can only be enabled in private projects.
    warning Workspaces can only be enabled in private projects.
    warning Workspaces can only be enabled in private projects.
    warning Workspaces can only be enabled in private projects.
    warning Workspaces can only be enabled in private projects.
    warning Workspaces can only be enabled in private projects.
    warning Workspaces can only be enabled in private projects.
    warning Workspaces can only be enabled in private projects.
    warning Workspaces can only be enabled in private projects.
    warning Workspaces can only be enabled in private projects.
    warning Workspaces can only be enabled in private projects.
    warning Workspaces can only be enabled in private projects.
    warning Workspaces can only be enabled in private projects.
    warning Workspaces can only be enabled in private projects.
    warning Workspaces can only be enabled in private projects.
    warning Workspaces can only be enabled in private projects.
    warning Workspaces can only be enabled in private projects.
    warning Workspaces can only be enabled in private projects.
    warning Workspaces can only be enabled in private projects.
    warning Workspaces can only be enabled in private projects.
    warning Workspaces can only be enabled in private projects.
    warning Workspaces can only be enabled in private projects.
    warning Workspaces can only be enabled in private projects.
    warning Workspaces can only be enabled in private projects.
    [5/5] Building fresh packages...
    Done in 3.29s.
    
  5. exit

  • longwave committed b7801031 on 10.6.x
    fix: #3566429 Update to 10.6.0 fails due to nodejs version...
longwave’s picture

Status: Reviewed & tested by the community » Fixed

Committed and pushed b78010313c2 to 10.6.x. Thanks!

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.