ESLint: 8.57.1 ReferenceError: Cannot read config file
[Feature Request] Update `ESLint` version and migrate config to `Flat Config` format
Help with eslint install and dependency problem
Having troubles updating Vue and Eslint dependencies
» npm install @eslint/js
» npm install eslint
**English is not my first language. Sorry if I made any mistakes or didn't clearly explain the problem.
I've been trying to install eslint for days, but every time, I get this error with the dependency. I've tried everything that i could think and find on the internet to fix it... I don't know why this is happening because it worked fine previously in other projects. I even tried to unistall Prettier, but I couldn't even do that.
Thinking that the problem might be my laptop, I used my mom's. I downloaded everything from git and vscode to node, and yet again, the same problem..... (Side note: strangely, it stopped asking me what format the project would use - in this case, it'd would be JSON - when answering npx eslint --init questions).
I'm going to describe every step I follow so you can tell me if the problem is here:
terminal: npx create-react-app projectName --template typescript
vscode: create .editorconfig file
vscode terminal: npm i --save-dev @typescript-eslint/eslint-plugin@latest eslint-plugin-react@latest @typescript-eslint/parser@latest eslint@latest --legacy-peer-deps
npx eslint --init after that:
check sintax and find problems
import/export
react
yes
browser
JSON (but it's not asking this anymore, so it creates eslint.config.mjs instead of .eslintrc.json)
yes
npm
and it shows this dependency error.... can someone help me, please? I'm quite literally going insane
I want to update all dependencies of a given Vue project. It uses
{
"dependencies": {
"@mdi/font": "7.4.47",
"ajv": "8.12.0",
"pinia": "2.1.7",
"roboto-fontface": "0.10.0",
"vue": "3.4.21",
"vue-i18n": "9.10.2",
"vuetify": "3.5.13"
},
"devDependencies": {
"@intlify/unplugin-vue-i18n": "4.0.0",
"@rushstack/eslint-patch": "1.10.1",
"@tsconfig/node18": "18.2.4",
"@types/node": "20.12.2",
"@vitejs/plugin-vue": "5.0.4",
"@vue/eslint-config-prettier": "9.0.0",
"@vue/eslint-config-typescript": "13.0.0",
"@vue/tsconfig": "0.5.1",
"eslint": "8.57.0",
"eslint-plugin-vue": "9.24.0",
"npm-run-all": "4.1.5",
"prettier": "3.2.5",
"typescript": "5.4.3",
"vite": "5.2.7",
"vue-tsc": "2.0.7"
}
}Updating all dependencies to their latest release version is not possible. Unfortunately the installation fails with
npm error code ERESOLVE npm error ERESOLVE could not resolve npm error npm error While resolving: @vue/eslint-config-typescript@13.0.0 npm error Found: eslint@9.9.0 npm error node_modules/eslint npm error dev eslint@"9.9.0" from the root project npm error peer eslint@"^6.0.0 || ^7.0.0 || >=8.0.0" from @eslint-community/eslint-utils@4.4.0 npm error node_modules/@eslint-community/eslint-utils npm error @eslint-community/eslint-utils@"^4.4.0" from @typescript-eslint/utils@7.18.0 npm error node_modules/@vue/eslint-config-typescript/node_modules/@typescript-eslint/eslint-plugin/node_modules/@typescript-eslint/utils npm error @typescript-eslint/utils@"7.18.0" from @typescript-eslint/eslint-plugin@7.18.0 npm error node_modules/@vue/eslint-config-typescript/node_modules/@typescript-eslint/eslint-plugin npm error @typescript-eslint/eslint-plugin@"^7.1.1" from @vue/eslint-config-typescript@13.0.0 npm error node_modules/@vue/eslint-config-typescript npm error 1 more (@typescript-eslint/type-utils) npm error @eslint-community/eslint-utils@"^4.2.0" from eslint@9.9.0 npm error 1 more (eslint-plugin-vue) npm error 5 more (@vue/eslint-config-prettier, eslint-config-prettier, ...) npm error npm error Could not resolve dependency: npm error peer eslint@"^8.56.0" from @vue/eslint-config-typescript@13.0.0 npm error node_modules/@vue/eslint-config-typescript npm error dev @vue/eslint-config-typescript@"13.0.0" from the root project npm error npm error Conflicting peer dependency: eslint@8.57.0 npm error node_modules/eslint npm error peer eslint@"^8.56.0" from @vue/eslint-config-typescript@13.0.0 npm error node_modules/@vue/eslint-config-typescript npm error dev @vue/eslint-config-typescript@"13.0.0" from the root project npm error npm error Fix the upstream dependency conflict, or retry npm error this command with --force or --legacy-peer-deps npm error to accept an incorrect (and potentially broken) dependency resolution. npm error npm error npm error For a full report see: npm error /home/runner/.npm/_logs/2024-08-12T18_43_57_954Z-eresolve-report.txt npm error A complete log of this run can be found in: /home/runner/.npm/_logs/2024-08-12T18_43_57_954Z-debug-0.log
I thought this would be an internal problem and I could wait some weeks but the problem still appears.
Does someone know how to fix this?
Please let me know if you need more information!