cypress-example-kitchensink icon indicating copy to clipboard operation
cypress-example-kitchensink copied to clipboard

Could not resolve after doing npm install issue with eslint plugins

Open gkimpson opened this issue 2 years ago • 0 comments

When running npm install on this cloned directory I get the following errors in my terminal (using iTerm)

npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR!
npm ERR! While resolving: @cypress/[email protected]
npm ERR! Found: [email protected]
npm ERR! node_modules/eslint-plugin-mocha
npm ERR!   dev eslint-plugin-mocha@"5.3.0" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer eslint-plugin-mocha@"^4.11.0" from @cypress/[email protected]
npm ERR! node_modules/@cypress/eslint-plugin-dev
npm ERR!   dev @cypress/eslint-plugin-dev@"5.0.0" from the root project
npm ERR!
npm ERR! Conflicting peer dependency: [email protected]
npm ERR! node_modules/eslint-plugin-mocha
npm ERR!   peer eslint-plugin-mocha@"^4.11.0" from @cypress/[email protected]
npm ERR!   node_modules/@cypress/eslint-plugin-dev
npm ERR!     dev @cypress/eslint-plugin-dev@"5.0.0" 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! See /Users/gavin/.npm/eresolve-report.txt for a full report.

Running Mac OS 12.3.1 Node 16.14.2 NPM 8.7.0

The eresolve text file has a lot of info but this appears to be the main bit

Raw JSON explanation object:

{
  "code": "ERESOLVE",
  "edge": {
    "type": "peer",
    "name": "eslint-plugin-mocha",
    "spec": "^4.11.0",
    "error": "INVALID",
    "from": {
      "name": "@cypress/eslint-plugin-dev",
      "version": "5.0.0",
      "location": "node_modules/@cypress/eslint-plugin-dev",
      "isWorkspace": false,
      "dependents": [
        {
          "type": "dev",
          "name": "@cypress/eslint-plugin-dev",
          "spec": "5.0.0",
          "from": {
            "location": "/Users/gavin/code/cypress-example-kitchensink"
          }
        }
      ]
    }
  },
  "dep": {
    "name": "eslint-plugin-mocha",
    "version": "4.12.1",
    "whileInstalling": {
      "name": "@cypress/eslint-plugin-dev",
      "version": "5.0.0",
      "path": "/Users/gavin/code/cypress-example-kitchensink/node_modules/@cypress/eslint-plugin-dev"
    },
    "location": "node_modules/eslint-plugin-mocha",
    "isWorkspace": false,
    "dependents": [
      {
        "type": "peer",
        "name": "eslint-plugin-mocha",
        "spec": "^4.11.0",
        "error": "INVALID",
        "from": {
          "name": "@cypress/eslint-plugin-dev",
          "version": "5.0.0",
          "location": "node_modules/@cypress/eslint-plugin-dev",
          "isWorkspace": false,
          "dependents": [
            {
              "type": "dev",
              "name": "@cypress/eslint-plugin-dev",
              "spec": "5.0.0",
              "from": {
                "location": "/Users/gavin/code/cypress-example-kitchensink"
              }
            }
          ]
        }
      }
    ]
  },
  "current": {
    "name": "eslint-plugin-mocha",
    "version": "5.3.0",
    "location": "node_modules/eslint-plugin-mocha",
    "isWorkspace": false,
    "dependents": [
      {
        "type": "dev",
        "name": "eslint-plugin-mocha",
        "spec": "5.3.0",
        "from": {
          "location": "/Users/gavin/code/cypress-example-kitchensink"
        }
      }
    ]
  },
  "peerConflict": {
    "current": {
      "name": "eslint-plugin-mocha",
      "version": "5.3.0",
      "location": "node_modules/eslint-plugin-mocha",
      "isWorkspace": false,
      "dependents": [
        {
          "type": "dev",
          "name": "eslint-plugin-mocha",
          "spec": "5.3.0",
          "from": {
            "location": "/Users/gavin/code/cypress-example-kitchensink"
          }
        }
      ]
    },
    "peer": {
      "name": "eslint-plugin-mocha",
      "version": "4.12.1",
      "whileInstalling": {
        "name": "@cypress/eslint-plugin-dev",
        "version": "5.0.0",
        "path": "/Users/gavin/code/cypress-example-kitchensink/node_modules/@cypress/eslint-plugin-dev"
      },
      "location": "node_modules/eslint-plugin-mocha",
      "isWorkspace": false,
      "dependents": [
        {
          "type": "peer",
          "name": "eslint-plugin-mocha",
          "spec": "^4.11.0",
          "error": "INVALID",
          "from": {
            "name": "@cypress/eslint-plugin-dev",
            "version": "5.0.0",
            "location": "node_modules/@cypress/eslint-plugin-dev",
            "isWorkspace": false,
            "dependents": [
              {
                "type": "dev",
                "name": "@cypress/eslint-plugin-dev",
                "spec": "5.0.0",
                "from": {
                  "location": "/Users/gavin/code/cypress-example-kitchensink"
                }
              }
            ]
          }
        }
      ]
    }
  },
  "strictPeerDeps": false,
  "force": false,
  "isMine": true
}

Any reason I'm getting this?

gkimpson avatar Apr 24 '22 18:04 gkimpson