Skip to content

[BUG] confusing ERESOLVE with overridden package #8101

Open
@austinw-fineart

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

npm spits out this nonsensical warning about a dependency that's clearly resolved:

npm warn ERESOLVE overriding peer dependency
npm warn While resolving: [email protected]
npm warn Found: peer eslint@">=8.40.0" from the root project
npm warn
npm warn Could not resolve dependency:
npm warn peer eslint@">=8.40.0" from the root project

The actual cause comes from an overridden dependency not mentioned here.

Expected Behavior

I expect warnings to make sense

Steps To Reproduce

package.json
package-lock.json

{
  "devDependencies": {
    "@stylistic/eslint-plugin": "^3.1.0",
    "eslint": "^9.20.1",
    "eslint-config-xo": "^0.46.0",
    "eslint-config-xo-typescript": "^7.0.0"
  },
  "overrides": {
    "eslint-config-xo-typescript": {
      "@stylistic/eslint-plugin": "$@stylistic/eslint-plugin"
    }
  }
}
  1. npm i

Environment

  • npm: 11.1.0
  • Node.js: v22.14.0
  • OS Name: Windows 11
  • System Model Name: System Product Name
  • npm config:
; "builtin" config from C:\Users\Austin\AppData\Roaming\npm\node_modules\npm\npmrc

prefix = "C:\\Users\\Austin\\AppData\\Roaming\\npm"

; "env" config from environment

cache = "D:\\packages\\npm"

; node bin location = C:\Program Files\nodejs\node.exe
; node version = v22.14.0
; npm local prefix = D:\New folder
; npm version = 11.1.0
; cwd = D:\New folder
; HOME = C:\Users\Austin
; Run `npm config ls -l` to show all defaults.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    Bugthing that needs fixingNeeds Triageneeds review for next steps

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions