Eslint issue on Yarn Install

24 views Asked by At

I am trying to run a project which requires 20.9.0. After installing the required node from NVM. Installation of yarn is giving the following error.

npm install yarn

npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR! 
npm ERR! While resolving: [email protected]
npm ERR! Found: [email protected]
npm ERR! node_modules/eslint
npm ERR!   dev eslint@"^8.57.0" from the root project
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peer eslint@"^7.12.1" from [email protected]
npm ERR! node_modules/eslint-config-standard
npm ERR!   dev eslint-config-standard@"^16.0.3" from the root project
npm ERR! 
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR! 
npm ERR! 
npm ERR! For a full report see:

Here is the package.json

{
  "name": "optimism",
  "version": "1.0.0",
  "author": "Optimism PBC",
  "license": "MIT",
  "private": true,
  "engines": {
    "node": ">=16",
    "pnpm": ">=8"
  },
  "scripts": {
    "preinstall": "npx only-allow yarn"
  },
  "devDependencies": {
    "@babel/eslint-parser": "^7.18.2",
    "@changesets/changelog-github": "^0.4.8",
    "@types/chai": "^4.3.8",
    "@types/chai-as-promised": "^7.1.4",
    "@types/mocha": "^10.0.3",
    "@types/node": "^20.8.9",
    "@typescript-eslint/eslint-plugin": "^6.9.0",
    "@typescript-eslint/parser": "^6.9.0",
    "chai": "^4.3.10",
    "depcheck": "^1.4.7",
    "doctoc": "^2.2.0",
    "eslint": "^8.57.0",
    "eslint-config-prettier": "^8.3.0",
    "eslint-config-standard": "^16.0.3",
    "eslint-plugin-import": "^2.29.0",
    "eslint-plugin-jsdoc": "^35.1.2",
    "eslint-plugin-node": "^11.1.0",
    "eslint-plugin-prefer-arrow": "^1.2.3",
    "eslint-plugin-prettier": "^4.0.0",
    "eslint-plugin-promise": "^5.1.0",
    "eslint-plugin-react": "^7.24.0",
    "eslint-plugin-unicorn": "^48.0.1",
    "husky": "^8.0.3",
    "lint-staged": "15.0.2",
    "markdownlint": "^0.31.0",
    "markdownlint-cli2": "0.4.0",
    "mocha": "^10.2.0",
    "nx": "17.0.2",
    "nx-cloud": "^16.0.4",
    "nyc": "^15.1.0",
    "patch-package": "^8.0.0",
    "prettier": "^2.8.0",
    "prettier-plugin-solidity": "^1.0.0-beta.13",
    "rimraf": "^5.0.5",
    "ts-mocha": "^10.0.0",
    "typescript": "^5.2.2"
  },
  "dependencies": {
    "@changesets/cli": "^2.26.0",
    "@codechecks/client": "^0.0.50",
    "yarn": "^1.22.22"
  }
}

I tried the following.

  • Reinstalling NVM and Node
  • Tried to install latest eslint

Even tried for setting up the eslint configuration but nothing is getting solved.

0

There are 0 answers