The Node.js version is 22.17.1 but the plugin "@netlify/plugin-lighthouse" requires >=14.15 <20

I get the error message on building the site.
The Node.js version is 22.17.1 but the plugin “@netlify/plugin-lighthouse” requires >=14.15 <20

I have updated node version in dependency managment under continuous deployment to <20
but see an error
Node.js version 18.x has reached end-of-life. We recommend using Node.js 22.x, the current LTS version, instead.

I also created an environment variable with node version 18. same issue
I also created a .node-version file in root of my project with version 18, same issue
Please help as I cannot deploy site updates now for many days.
Thank you

SIte name: transcendent-cocada-58da96
Custom domain name: shaunagra-custom-frames.ie
I asked (Asked Netlify) no result

Build log

10:24:38 AM: build-image version: 235a96ed6c11cbdf942eed7e70e6802956f9b464 (focal)
10:24:38 AM: buildbot version: 09e1898b62f1787f28f3d49630f96c3fc8719129
10:24:39 AM: Fetching cached dependencies
10:24:39 AM: Starting to download cache of 14.3GB (Last modified: 2025-07-15 14:17:45 +0000 UTC)
10:25:30 AM: Finished downloading cache in 51.424s
10:25:30 AM: Starting to extract cache
10:27:50 AM: Finished extracting cache in 2m19.643s
10:27:50 AM: Finished fetching cache in 3m11.465s
10:27:50 AM: Starting to prepare the repo for build
10:27:50 AM: Preparing Git Reference refs/heads/main
10:29:20 AM: Starting to install dependencies
10:29:20 AM: Started restoring cached mise cache
10:29:20 AM: Finished restoring cached mise cache
10:29:21 AM: mise python@3.13.5 install
10:29:21 AM: mise python@3.13.5 download cpython-3.13.5+20250712-x86_64-unknown-linux-gnu-install_only_stripped.tar.gz
10:29:21 AM: mise python@3.13.5 extract cpython-3.13.5+20250712-x86_64-unknown-linux-gnu-install_only_stripped.tar.gz
10:29:22 AM: mise python@3.13.5 python --version
10:29:22 AM: mise python@3.13.5 Python 3.13.5
10:29:22 AM: mise python@3.13.5 ✓ installed
10:29:22 AM: Python version set to 3.13
10:29:23 AM: Collecting pipenv
10:29:23 AM: Downloading pipenv-2025.0.4-py3-none-any.whl.metadata (17 kB)
10:29:23 AM: Collecting certifi (from pipenv)
10:29:24 AM: Downloading certifi-2025.7.14-py3-none-any.whl.metadata (2.4 kB)
10:29:24 AM: Collecting packaging>=22 (from pipenv)
10:29:24 AM: Downloading packaging-25.0-py3-none-any.whl.metadata (3.3 kB)
10:29:24 AM: Collecting setuptools>=67 (from pipenv)
10:29:24 AM: Downloading setuptools-80.9.0-py3-none-any.whl.metadata (6.6 kB)
10:29:24 AM: Collecting virtualenv>=20.24.2 (from pipenv)
10:29:24 AM: Downloading virtualenv-20.32.0-py3-none-any.whl.metadata (4.5 kB)
10:29:24 AM: Collecting distlib<1,>=0.3.7 (from virtualenv>=20.24.2->pipenv)
10:29:24 AM: Downloading distlib-0.4.0-py2.py3-none-any.whl.metadata (5.2 kB)
10:29:24 AM: Collecting filelock<4,>=3.12.2 (from virtualenv>=20.24.2->pipenv)
10:29:24 AM: Downloading filelock-3.18.0-py3-none-any.whl.metadata (2.9 kB)
10:29:24 AM: Collecting platformdirs<5,>=3.9.1 (from virtualenv>=20.24.2->pipenv)
10:29:24 AM: Downloading platformdirs-4.3.8-py3-none-any.whl.metadata (12 kB)
10:29:24 AM: Downloading pipenv-2025.0.4-py3-none-any.whl (2.9 MB)
10:29:24 AM: ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 2.9/2.9 MB 24.3 MB/s eta 0:00:00
10:29:24 AM: Downloading packaging-25.0-py3-none-any.whl (66 kB)
10:29:24 AM: Downloading setuptools-80.9.0-py3-none-any.whl (1.2 MB)
10:29:24 AM: ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.2/1.2 MB 37.0 MB/s eta 0:00:00
10:29:24 AM: Downloading virtualenv-20.32.0-py3-none-any.whl (6.1 MB)
10:29:24 AM: ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 6.1/6.1 MB 93.7 MB/s eta 0:00:00
10:29:24 AM: Downloading certifi-2025.7.14-py3-none-any.whl (162 kB)
10:29:24 AM: Downloading distlib-0.4.0-py2.py3-none-any.whl (469 kB)
10:29:25 AM: Downloading filelock-3.18.0-py3-none-any.whl (16 kB)
10:29:25 AM: Downloading platformdirs-4.3.8-py3-none-any.whl (18 kB)
10:29:25 AM: Installing collected packages: distlib, setuptools, platformdirs, packaging, filelock, certifi, virtualenv, pipenv
10:29:27 AM: Successfully installed certifi-2025.7.14 distlib-0.4.0 filelock-3.18.0 packaging-25.0 pipenv-2025.0.4 platformdirs-4.3.8 setuptools-80.9.0 virtualenv-20.32.0
10:29:27 AM: [notice] A new release of pip is available: 24.3.1 → 25.1.1
10:29:27 AM: [notice] To update, run: pip install --upgrade pip
10:29:27 AM: Attempting Ruby version 2.7.2, read from environment
10:29:28 AM: Using Ruby version 2.7.2
10:29:29 AM: Started restoring cached go cache
10:29:29 AM: Finished restoring cached go cache
10:29:29 AM: go version go1.19.13 linux/amd64
10:29:29 AM: Using PHP version 8.0
10:29:30 AM: Started restoring cached Node.js version
10:29:57 AM: Finished restoring cached Node.js version
10:29:58 AM: Downloading and installing node v18.20.8…
10:29:58 AM: Downloading https://nodejs.org/dist/v18.20.8/node-v18.20.8-linux-x64.tar.xz
10:29:58 AM: Computing checksum with sha256sum
10:29:58 AM: Checksums matched!
10:30:00 AM: Now using node v18.20.8 (npm v10.8.2)
10:30:00 AM: Enabling Node.js Corepack
10:30:00 AM: Started restoring cached build plugins
10:30:00 AM: Finished restoring cached build plugins
10:30:01 AM: Successfully installed dependencies
10:30:01 AM: Starting build script
10:30:02 AM: Detected 2 framework(s)
10:30:02 AM: “hugo” at version “unknown”
10:30:02 AM: “zola” at version “unknown”
10:30:02 AM: Section completed: initializing
10:30:04 AM: Failed during stage ‘building site’: Build script returned non-zero exit code: 2 (Search results for '"non-zero exit code: 2"' - Netlify Support Forums)
10:30:04 AM: ​
10:30:04 AM: Netlify Build
10:30:04 AM: ────────────────────────────────────────────────────────────────
10:30:04 AM: ​
10:30:04 AM: ❯ Version
10:30:04 AM: @netlify/build 34.3.0
10:30:04 AM: ​
10:30:04 AM: ❯ Flags
10:30:04 AM: accountId: 610bdc68aae708de8ddc3e4b
10:30:04 AM: baseRelDir: true
10:30:04 AM: buildId: 687f5832e7f01a00086fb33c
10:30:04 AM: deployId: 687f5832e7f01a00086fb33e
10:30:04 AM: ​
10:30:04 AM: ❯ Current directory
10:30:04 AM: /opt/build/repo
10:30:04 AM: ​
10:30:04 AM: ❯ Config file
10:30:04 AM: No config file was defined: using default values.
10:30:04 AM: ​
10:30:04 AM: ❯ Context
10:30:04 AM: production
10:30:04 AM: ​
10:30:04 AM: Configuration error
10:30:04 AM: ────────────────────────────────────────────────────────────────
10:30:04 AM: ​
10:30:04 AM: Error message
10:30:04 AM: The Node.js version is 22.17.1 but the plugin “@netlify/plugin-lighthouse” requires >=14.15 <20
10:30:04 AM: ​
10:30:04 AM: Resolved config
10:30:04 AM: build:
10:30:04 AM: command: hugo
10:30:04 AM: commandOrigin: ui
10:30:04 AM: environment:
10:30:04 AM: - NODE_VERSION
10:30:04 AM: publish: /opt/build/repo/public
10:30:04 AM: publishOrigin: ui
10:30:04 AM: plugins:
10:30:04 AM: - inputs: {}
10:30:04 AM: origin: ui
10:30:04 AM: package: “@netlify/plugin-lighthouse”
10:30:04 AM: Build failed due to a user error: Build script returned non-zero exit code: 2
10:30:04 AM: Failing build: Failed to build site
10:30:04 AM: Finished processing build request in 5m26.023s

@mjneary10 Update the version of @netlify/plugin-lighthouse being used.

If it’s saying >=14.15 <20 then it must be a version before these Jan 2024 changes:

The latest version is 6.0.1:

Having exactly the same issue. Our build explicitly sets node v18 in the Netlify UI and in the .nvmrc file. The initialization step correctly sets node to v18, however the build step fails with the above error.

Initialization:

9:45:16 AM: Attempting Node.js version '18.20.3' from .nvmrc
9:45:16 AM: Downloading and installing node v18.20.3...
9:45:16 AM: Downloading https://nodejs.org/dist/v18.20.3/node-v18.20.3-linux-x64.tar.xz...
9:45:17 AM: Computing checksum with sha256sum
9:45:17 AM: Checksums matched!
9:45:19 AM: Now using node v18.20.3 (npm v10.7.0)
9:45:19 AM: Enabling Node.js Corepack
9:45:19 AM: Started restoring cached build plugins
9:45:19 AM: Finished restoring cached build plugins
9:45:19 AM: Started restoring cached corepack dependencies
9:45:19 AM: Finished restoring cached corepack dependencies
9:45:19 AM: No npm workspaces detected
9:45:19 AM: Started restoring cached node modules
9:45:19 AM: Finished restoring cached node modules
9:45:19 AM: Installing npm packages using npm version 10.7.0

And then in build:

9:45:53 AM:   The Node.js version is 22.17.1 but the plugin "@netlify/plugin-lighthouse" requires >=14.15 <20

If a build explicitly sets node to a certain version, should it not be respected in the build step? Kind of odd to see node switching from 18 to 22 between two different stages of deployment.

That is odd, I hadn’t spotted it in the originally supplied build log.

I’d interpreted the main issue as that plugin being unable to run with Node.js 20+, which was addressed some time ago.

If the plugin is running “during build” I’d expect it to respect the Node.js version set.

Plugins don’t use user-defined Node.js versions. They use the system Node.js version which currently is Node 22.