dependabot / dependabot/dependabot-core
Dependabot doesn't honor package.json/engine/node causing ERR_PNPM_UNSUPPORTED_ENGINE
Nobody has claimed this yet.
- Dominant language
- Ruby
- Stars
- 5.8k
- Forks
- 1.5k
- Avg merge
- 2d 13h
- Merged PRs (30d)
- 151
Description
Is there an existing issue for this?
- I have searched the existing issues
Package ecosystem
npm
Package manager version
pnpm
Language version
Node.js 18
Manifest location and content before the Dependabot update
No response
dependabot.yml content
No response
Updated dependency
No response
What you expected to see, versus what you actually saw
I'm using pnpm (a million thanks for supporting it! ✨).
I've specified to use node 18 in my package.json (engine.node):
{
"engines": {
"node": "18"
},
// ...
}
And enforced this using
# .npmrc
engine-strict=true
Dependabot seems not to install Node 18 but Node 16. Resulting in this error:
updater | 2023/06/10 18:59:28 ERROR <job_676379356> ERR_PNPM_UNSUPPORTED_ENGINE Unsupported environment (bad pnpm and/or Node.js version)
updater |
updater | Your Node version is incompatible with "/home/dependabot/dependabot-updater/repo".
updater |
updater | Expected version: 18
updater | Got: v16.20.0
updater |
updater | This is happening because the package's manifest has an engines.node field specified.
updater | To fix this issue, install the required Node version.
I would expect, that Dependabot installs/uses the Node version as specified in package.json.
Native package manager behavior
No response
Images of the diff or a link to the PR, issue, or logs
No response
Smallest manifest that reproduces the issue
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The report identifies package.json and .npmrc, with dependabot.yml and updater logs as context. Start by reproducing the pnpm update with Node 18 declared in package.json and engine-strict=true in .npmrc, then trace how the updater selects its Node runtime. Done means the reproduction uses the declared runtime without ERR_PNPM_UNSUPPORTED_ENGINE.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, node.js
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 32/100