dependabot / dependabot/dependabot-core

Dependabot doesn't honor package.json/engine/node causing ERR_PNPM_UNSUPPORTED_ENGINE

Open
#7,426 8 comments 12 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

T: bug 🐞
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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.