Open
Description
Is there an existing issue for this?
- I have searched the existing issues
This issue exists in the latest npm version
- I am using the latest npm
Current Behavior
When running npm i --omit=dev
in a project with devDependencies requiring newer versions of Node/NPM, e.g. @typescript/native-preview
the install will fail on older Node versions despite the fact that this is completely irrelevant to the elected package tree.
Expected Behavior
Minimum version is computed without dev dependencies -> install succeeds.
Steps To Reproduce
- When using Node <20.6.0
- In a project where devDependencies contains e.g.
"@typescript/native-preview": "7.0.0-dev.20250523.1"
- Run
npm i --omit=dev
npm error code EBADENGINE
npm error engine Unsupported engine
npm error engine Not compatible with your version of node/npm: @typescript/native-preview@7.0.0-dev.20250523.1
npm error notsup Not compatible with your version of node/npm: @typescript/native-preview@7.0.0-dev.20250523.1
npm error notsup Required: {"node":">=20.6.0"}
npm error notsup Actual: {"npm":"10.8.2","node":"v18.20.5"}
Environment
N/A