Closed nyxb closed 3 days ago
Similar output using npm
:
➜ ~ npx @antfu/eslint-config
Need to install the following packages:
@antfu/eslint-config@2.22.0-beta.3
Ok to proceed? (y)
npm WARN ERESOLVE overriding peer dependency
npm WARN ERESOLVE overriding peer dependency
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: eslint-plugin-unused-imports@4.0.0
npm WARN Found: peerOptional @typescript-eslint/eslint-plugin@"8" from the root project
npm WARN
npm WARN Could not resolve dependency:
npm WARN peerOptional @typescript-eslint/eslint-plugin@"8" from the root project
npm WARN ERESOLVE overriding peer dependency
npm ERR! code ETARGET
npm ERR! notarget No matching version found for @typescript-eslint/eslint-plugin@8.
npm ERR! notarget In most cases you or one of your dependencies are requesting
npm ERR! notarget a package version that doesn't exist.
npm ERR! A complete log of this run can be found in: /Users/guillaumetorreilles/.npm/_logs/2024-07-08T14_25_06_752Z-debug-0.log
Caused by https://github.com/sweepline/eslint-plugin-unused-imports/issues/85
add this to package.json
"overrides": {
"@typescript-eslint/eslint-plugin": "rc-v8"
}
Caused by sweepline/eslint-plugin-unused-imports#85
Workaround:
add this to package.json
"overrides": { "@typescript-eslint/eslint-plugin": "rc-v8" }
tried this and get the same error using bun:
npx @antfu/eslint-config@latest
Need to install the following packages:
@antfu/eslint-config@2.22.0
Ok to proceed? (y)
> npm warn ERESOLVE overriding peer dependency
> npm warn ERESOLVE overriding peer dependency
> npm warn ERESOLVE overriding peer dependency
> npm warn While resolving: eslint-plugin-unused-imports@4.0.0
> npm warn Found: peerOptional @typescript-eslint/eslint-plugin@"8" from the root project
> npm warn
> npm warn Could not resolve dependency:
> npm warn peerOptional @typescript-eslint/eslint-plugin@"8" from the root project
> npm warn ERESOLVE overriding peer dependency
> npm error code ETARGET
> npm error notarget No matching version found for @typescript-eslint/eslint-plugin@8.
> npm error notarget In most cases you or one of your dependencies are requesting
> npm error notarget a package version that doesn't exist.
The above workaround didn't have any effect, so I'm using the previous version of antfu/eslint-config:
npm i -D @antfu/eslint-config@2.21.0
You should also fix your package.json to the version you choose, so that future attempts to run npm install
don't reach for the latest version: that is, remove the caret in
"devDependencies": {
"@antfu/eslint-config": "^2.21.0"
}
Try to override dependency, than install @antfu/eslint-config@latest (npm i @antfu/eslint-config@latest
) and run npx again
The point of the thing is to be able to execute npx @antfu/eslint-config@latest in a new project to install everything with the cli and unfortunately this is no longer possible.
Describe the bug
npm warn ERESOLVE overriding peer dependency npm warn ERESOLVE overriding peer dependency npm warn While resolving: eslint-plugin-unused-imports@4.0.0 npm warn Found: @typescript-eslint/eslint-plugin@undefined npm warn node_modules/@antfu/eslint-config/node_modules/@typescript-eslint/eslint-plugin npm warn npm warn Could not resolve dependency: npm warn peerOptional @typescript-eslint/eslint-plugin@"8" from eslint-plugin-unused-imports@4.0.0 npm warn node_modules/@antfu/eslint-config/node_modules/eslint-plugin-unused-imports npm warn eslint-plugin-unused-imports@"^4.0.0" from @antfu/eslint-config@2.22.0-beta.3 npm warn node_modules/@antfu/eslint-config npm error code ETARGET npm error notarget No matching version found for @typescript-eslint/eslint-plugin@8. npm error notarget In most cases you or one of your dependencies are requesting npm error notarget a package version that doesn't exist.
npm error A complete log of this run can be found in: /Users/nyxb/.npm/_logs/2024-07-07T15_38_55_713Z-debug-0.log
Reproduction
only use the cli
System Info
Used Package Manager
pnpm
Validations
Contributions