Skip to content

npm install EBADENGINE warning using .nvmrc Node.js version v20.12.2 #661

@MikeMcC399

Description

@MikeMcC399

Current behavior

If npm install is run using the version of Node.js v20.12.2 that is defined in .nvmrc then EBADENGINE warnings are output:

npm WARN EBADENGINE Unsupported engine

Component Installed Required
Node.js v20.12.2 ^20.19.0
npm 10.5.0 >= 10.8.2

Expected behavior

It should be possible to use npm install without EBADENGINE warnings.

Steps to reproduce

Component Version
Ubuntu 24.04.3 LTS
n 10.2.0
git clone https://github.com/webdriverio-community/node-geckodriver
cd node-geckodriver
git clean -xfd # if repeating
n auto # or nvm use, etc. to set to Node.js v20.12.2
npm install

Logs

$ npm install
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE   package: '@phun-ky/[email protected]',
npm WARN EBADENGINE   required: { node: '^20.9.0 || >=22.0.0', npm: '>=10.8.2' },
npm WARN EBADENGINE   current: { node: 'v20.12.2', npm: '10.5.0' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE   package: '[email protected]',
npm WARN EBADENGINE   required: { node: '^20.19.0 || >=22.12.0' },
npm WARN EBADENGINE   current: { node: 'v20.12.2', npm: '10.5.0' }
npm WARN EBADENGINE }
npm WARN deprecated [email protected]: Use your platform's native DOMException instead

> [email protected] postinstall
> test -f ./dist/install.js && node ./dist/install.js || echo "Skipping install, project not built!"

Skipping install, project not built!

> [email protected] prepare
> husky


added 701 packages, and audited 702 packages in 17s

170 packages are looking for funding
  run `npm fund` for details

4 low severity vulnerabilities

To address issues that do not require attention, run:
  npm audit fix

To address all issues (including breaking changes), run:
  npm audit fix --force

Run `npm audit` for details.

Assessment

Node.js version managers such as nvm use .nvmrc to automate the selection of a defined Node.js version.

nvm use, executed in the repo, automatically selects Node.js v20.12.2 for usage.

.nvmrc must specify a minimum of v20.19.0 (with bundled npm 10.8.2)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions