Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[npm] getting "warn ERESOLVE overriding peer dependency" on clean install #391

Closed
3 of 5 tasks
patwork opened this issue May 12, 2024 · 1 comment
Closed
3 of 5 tasks

Comments

@patwork
Copy link

patwork commented May 12, 2024

Validations

Describe the bug

Hi, when installing @stylistic/eslint-plugin I get a warning message about warn ERESOLVE overriding peer dependency twice.

  • npm@10.7.0
  • node@v22.1.0

package.json before npm i --verbose -D @stylistic/eslint-plugin (clean install)

{
  "name": "test",
  "version": "1.0.0",
  "author": "",
  "license": "MIT",
  "devDependencies": {
    "@eslint/js": "^9.2.0",
    "eslint": "^9.2.0",
    "globals": "^15.2.0"
  }
}

error log:

npm verbose cli /usr/bin/node /usr/bin/npm
npm info using npm@10.7.0
npm info using node@v22.1.0
npm verbose title npm i @stylistic/eslint-plugin
npm verbose argv "i" "--loglevel" "verbose" "--save-dev" "@stylistic/eslint-plugin"
npm verbose logfile logs-max:10 dir:/home/patwork/.npm/_logs/2024-05-12T13_25_59_692Z-
npm verbose logfile /home/patwork/.npm/_logs/2024-05-12T13_25_59_692Z-debug-0.log
npm http fetch GET 200 https://registry.npmjs.org/@stylistic%2feslint-plugin 1705ms (cache revalidated)
npm http fetch GET 200 https://registry.npmjs.org/eslint 9ms (cache hit)
npm http fetch GET 200 https://registry.npmjs.org/@types%2feslint 144ms (cache revalidated)
npm http fetch GET 200 https://registry.npmjs.org/@stylistic%2feslint-plugin-plus 1462ms (cache revalidated)
npm http fetch GET 200 https://registry.npmjs.org/@stylistic%2feslint-plugin-js 1337ms (cache revalidated)
npm http fetch GET 200 https://registry.npmjs.org/@stylistic%2feslint-plugin-jsx 1571ms (cache revalidated)
npm http fetch GET 200 https://registry.npmjs.org/@stylistic%2feslint-plugin-ts 1468ms (cache revalidated)
npm http fetch GET 200 https://registry.npmjs.org/picomatch 100ms (cache revalidated)
npm http fetch GET 200 https://registry.npmjs.org/@typescript-eslint%2futils 135ms (cache revalidated)
npm http fetch GET 200 https://registry.npmjs.org/@types%2festree 198ms (cache revalidated)
npm http fetch GET 200 https://registry.npmjs.org/@types%2fjson-schema 1499ms (cache revalidated)
npm warn ERESOLVE overriding peer dependency
npm verbose attempt to log crashed ERESOLVE overriding peer dependency {
npm verbose   code: 'ERESOLVE',
npm verbose   edge: {
npm verbose     type: 'peer',
npm verbose     name: 'eslint',
npm verbose     spec: '^8.56.0',
npm verbose     error: 'INVALID',
npm verbose     from: {
npm verbose       name: '@typescript-eslint/utils',
npm verbose       version: '7.8.0',
npm verbose       location: 'node_modules/@stylistic/eslint-plugin-plus/node_modules/@typescript-eslint/utils',
npm verbose       isWorkspace: false,
npm verbose       dependents: [Array]
npm verbose     }
npm verbose   },
npm verbose   dep: {
npm verbose     name: 'eslint',
npm verbose     version: '8.57.0',
npm verbose     whileInstalling: {
npm verbose       name: '@stylistic/eslint-plugin-plus',
npm verbose       version: '2.1.0',
npm verbose       path: '/home/patwork/tmp/test/node_modules/@stylistic/eslint-plugin-plus'
npm verbose     },
npm verbose     location: 'node_modules/eslint',
npm verbose     isWorkspace: false,
npm verbose     dependents: [ [Object] ]
npm verbose   },
npm verbose   force: false,
npm verbose   isMine: false,
npm verbose   strictPeerDeps: false,
npm verbose   current: {
npm verbose     name: 'eslint',
npm verbose     version: '9.2.0',
npm verbose     location: 'node_modules/eslint',
npm verbose     isWorkspace: false,
npm verbose     dependents: [ [Object] ]
npm verbose   },
npm verbose   peerConflict: {
npm verbose     name: 'eslint',
npm verbose     version: '9.2.0',
npm verbose     location: 'node_modules/eslint',
npm verbose     isWorkspace: false,
npm verbose     dependents: [ [Object] ]
npm verbose   }
npm verbose } TypeError: Cannot read properties of undefined (reading 'extraneous')
npm verbose     at printNode (/usr/lib/node_modules/npm/lib/utils/explain-dep.js:24:13)
npm verbose     at explainNode (/usr/lib/node_modules/npm/lib/utils/explain-dep.js:4:3)
npm verbose     at explain (/usr/lib/node_modules/npm/lib/utils/explain-eresolve.js:39:16)
npm verbose     at #tryWriteLog (/usr/lib/node_modules/npm/lib/utils/display.js:345:41)
npm verbose     at /usr/lib/node_modules/npm/lib/utils/display.js:233:28
npm verbose     at process.<anonymous> (/usr/lib/node_modules/npm/lib/utils/display.js:95:10)
npm verbose     at process.emit (node:events:532:35)
npm verbose     at Object.warn (/usr/lib/node_modules/npm/node_modules/proc-log/lib/index.js:62:22)
npm verbose     at PlaceDep.warnPeerConflict (/usr/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/place-dep.js:496:9)
npm verbose     at new PlaceDep (/usr/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/place-dep.js:165:14)
npm http fetch GET 200 https://registry.npmjs.org/@types%2fsemver 66ms (cache revalidated)
npm http fetch GET 200 https://registry.npmjs.org/@typescript-eslint%2ftypes 183ms (cache revalidated)
npm http fetch GET 200 https://registry.npmjs.org/@typescript-eslint%2fscope-manager 291ms (cache revalidated)
npm http fetch GET 200 https://registry.npmjs.org/@typescript-eslint%2ftypescript-estree 390ms (cache revalidated)
npm http fetch GET 200 https://registry.npmjs.org/semver 391ms (cache revalidated)
npm warn ERESOLVE overriding peer dependency
npm verbose attempt to log crashed ERESOLVE overriding peer dependency {
npm verbose   code: 'ERESOLVE',
npm verbose   edge: {
npm verbose     type: 'peer',
npm verbose     name: 'eslint',
npm verbose     spec: '^8.56.0',
npm verbose     error: 'INVALID',
npm verbose     from: {
npm verbose       name: '@typescript-eslint/utils',
npm verbose       version: '7.8.0',
npm verbose       location: 'node_modules/@stylistic/eslint-plugin-ts/node_modules/@typescript-eslint/utils',
npm verbose       isWorkspace: false,
npm verbose       dependents: [Array]
npm verbose     }
npm verbose   },
npm verbose   dep: {
npm verbose     name: 'eslint',
npm verbose     version: '8.57.0',
npm verbose     whileInstalling: {
npm verbose       name: '@stylistic/eslint-plugin-ts',
npm verbose       version: '2.1.0',
npm verbose       path: '/home/patwork/tmp/test/node_modules/@stylistic/eslint-plugin-ts'
npm verbose     },
npm verbose     location: 'node_modules/eslint',
npm verbose     isWorkspace: false,
npm verbose     dependents: [ [Object] ]
npm verbose   },
npm verbose   force: false,
npm verbose   isMine: false,
npm verbose   strictPeerDeps: false,
npm verbose   current: {
npm verbose     name: 'eslint',
npm verbose     version: '9.2.0',
npm verbose     location: 'node_modules/eslint',
npm verbose     isWorkspace: false,
npm verbose     dependents: [ [Object] ]
npm verbose   },
npm verbose   peerConflict: {
npm verbose     name: 'eslint',
npm verbose     version: '9.2.0',
npm verbose     location: 'node_modules/eslint',
npm verbose     isWorkspace: false,
npm verbose     dependents: [ [Object] ]
npm verbose   }
npm verbose } TypeError: Cannot read properties of undefined (reading 'extraneous')
npm verbose     at printNode (/usr/lib/node_modules/npm/lib/utils/explain-dep.js:24:13)
npm verbose     at explainNode (/usr/lib/node_modules/npm/lib/utils/explain-dep.js:4:3)
npm verbose     at explain (/usr/lib/node_modules/npm/lib/utils/explain-eresolve.js:39:16)
npm verbose     at #tryWriteLog (/usr/lib/node_modules/npm/lib/utils/display.js:345:41)
npm verbose     at /usr/lib/node_modules/npm/lib/utils/display.js:233:28
npm verbose     at process.<anonymous> (/usr/lib/node_modules/npm/lib/utils/display.js:95:10)
npm verbose     at process.emit (node:events:532:35)
npm verbose     at Object.warn (/usr/lib/node_modules/npm/node_modules/proc-log/lib/index.js:62:22)
npm verbose     at PlaceDep.warnPeerConflict (/usr/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/place-dep.js:496:9)
npm verbose     at new PlaceDep (/usr/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/place-dep.js:165:14)
npm http fetch GET 200 https://registry.npmjs.org/@typescript-eslint%2fvisitor-keys 133ms (cache revalidated)
npm http fetch GET 200 https://registry.npmjs.org/minimatch 24ms (cache hit)
npm http fetch GET 200 https://registry.npmjs.org/ts-api-utils 82ms (cache revalidated)
npm http fetch GET 200 https://registry.npmjs.org/globby 871ms (cache revalidated)
npm http fetch GET 200 https://registry.npmjs.org/eslint-visitor-keys 10ms (cache hit)
npm http fetch GET 200 https://registry.npmjs.org/typescript 103ms (cache revalidated)
npm http fetch GET 200 https://registry.npmjs.org/array-union 41ms (cache revalidated)
npm http fetch GET 200 https://registry.npmjs.org/dir-glob 72ms (cache revalidated)
npm http fetch GET 200 https://registry.npmjs.org/merge2 54ms (cache revalidated)
npm http fetch GET 200 https://registry.npmjs.org/brace-expansion 5ms (cache hit)
npm http fetch GET 200 https://registry.npmjs.org/slash 44ms (cache revalidated)
npm http fetch GET 200 https://registry.npmjs.org/fast-glob 772ms (cache revalidated)
npm http fetch GET 200 https://registry.npmjs.org/glob-parent 12ms (cache hit)
npm http fetch GET 200 https://registry.npmjs.org/path-type 55ms (cache revalidated)
npm http fetch GET 200 https://registry.npmjs.org/micromatch 53ms (cache revalidated)
npm http fetch GET 200 https://registry.npmjs.org/braces 645ms (cache revalidated)
npm http fetch GET 200 https://registry.npmjs.org/fill-range 66ms (cache revalidated)
npm http fetch GET 200 https://registry.npmjs.org/to-regex-range 79ms (cache revalidated)
npm http fetch GET 200 https://registry.npmjs.org/is-number 61ms (cache revalidated)
npm http fetch POST 200 https://registry.npmjs.org/-/npm/v1/security/advisories/bulk 268ms
npm verbose exit 0
npm info ok

Here is warning from PNPM. Is it issue in @typescript-eslint then?

 WARN  Issues with peer dependencies found
.
└─┬ @stylistic/eslint-plugin 2.1.0
  └─┬ @stylistic/eslint-plugin-plus 2.1.0
    └─┬ @typescript-eslint/utils 7.8.0
      └── ✕ unmet peer eslint@^8.56.0: found 9.2.0

Reproduction

mkdir test
cd test
npm init
npm install -D eslint @eslint/js globals
npm install -D @stylistic/eslint-plugin
npm warn ERESOLVE overriding peer dependency
npm warn ERESOLVE overriding peer dependency

added 36 packages, and audited 127 packages in 5s

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

found 0 vulnerabilities

Contributes

  • I am willing to submit a PR to fix this issue
  • I am willing to submit a PR with failing tests
@antfu
Copy link
Member

antfu commented May 12, 2024

#387

@antfu antfu closed this as not planned Won't fix, can't repro, duplicate, stale May 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants