StateVoicesNational / Spoke

mass-contact text/SMS distribution tool
Other
466 stars 410 forks source link

Bug: npm "unable to resolve dependency tree" on newly cloned local repo #1980

Closed eudaimonstro closed 2 months ago

eudaimonstro commented 3 years ago

Describe the bug Running npm install results in error:

# npm resolution error report

2021-04-17T21:27:36.334Z

While resolving: spoke@10.1.0
Found: eslint@2.13.1
node_modules/eslint
  dev eslint@"2.13.1" from the root project

Could not resolve dependency:
peer eslint@">=3.14.1" from eslint-config-prettier@6.15.0
node_modules/eslint-config-prettier
  dev eslint-config-prettier@"^6.10.0" from the root project

Fix the upstream dependency conflict, or retry
this command with --force, or --legacy-peer-deps
to accept an incorrect (and potentially broken) dependency resolution.

Raw JSON explanation object:

{
  "code": "ERESOLVE",
  "current": {
    "name": "eslint",
    "version": "2.13.1",
    "whileInstalling": {
      "name": "spoke",
      "version": "10.1.0",
      "path": "/home/steve/workspace/Spoke"
    },
    "location": "node_modules/eslint",
    "dependents": [
      {
        "type": "dev",
        "name": "eslint",
        "spec": "2.13.1",
        "from": {
          "location": "/home/steve/workspace/Spoke"
        }
      }
    ]
  },
  "edge": {
    "type": "peer",
    "name": "eslint",
    "spec": ">=3.14.1",
    "error": "INVALID",
    "from": {
      "name": "eslint-config-prettier",
      "version": "6.15.0",
      "whileInstalling": {
        "name": "spoke",
        "version": "10.1.0",
        "path": "/home/steve/workspace/Spoke"
      },
      "location": "node_modules/eslint-config-prettier",
      "dependents": [
        {
          "type": "dev",
          "name": "eslint-config-prettier",
          "spec": "^6.10.0",
          "from": {
            "location": "/home/steve/workspace/Spoke"
          }
        }
      ]
    }
  },
  "peerConflict": null,
  "strictPeerDeps": false,
  "force": false
}

To Reproduce Steps to reproduce the behavior:

  1. Clone new repository
  2. Navigate to repository
  3. Run npm install
  4. See error

Expected behavior npm install should succesfully install all dependencies.

Screenshots image

Platform (please complete the following information):

Additional context Looking to get spoke running locally, looks like it's declaring an out of date version of es-lint that eslint-config-prettier cannot work with.

eudaimonstro commented 3 years ago

npm install --force works, but shows lots of packages with incompatible versions:

❯ npm install --force
npm WARN using --force Recommended protections disabled.
npm WARN ERESOLVE overriding peer dependency
npm WARN Found: react@16.14.0
npm WARN node_modules/react
npm WARN   react@"16.14.0" from the root project
npm WARN 
npm WARN Could not resolve dependency:
npm WARN peer react@"^0.14.0 || ^15.0.0-rc" from draft-js@0.7.0
npm WARN node_modules/draft-js
npm WARN   draft-js@"^0.7.0" from the root project
npm WARN ERESOLVE overriding peer dependency
npm WARN Found: react-dom@16.14.0
npm WARN node_modules/react-dom
npm WARN   react-dom@"16.14.0" from the root project
npm WARN 
npm WARN Could not resolve dependency:
npm WARN peer react-dom@"^0.14.0 || ^15.0.0-rc" from draft-js@0.7.0
npm WARN node_modules/draft-js
npm WARN   draft-js@"^0.7.0" from the root project
npm WARN ERESOLVE overriding peer dependency
npm WARN Found: eslint@2.13.1
npm WARN node_modules/eslint
npm WARN   dev eslint@"2.13.1" from the root project
npm WARN   3 more (eslint-config-airbnb, eslint-plugin-jsx-a11y, eslint-plugin-import)
npm WARN 
npm WARN Could not resolve dependency:
npm WARN peer eslint@">=3.14.1" from eslint-config-prettier@6.15.0
npm WARN node_modules/eslint-config-prettier
npm WARN   dev eslint-config-prettier@"^6.10.0" from the root project
npm WARN ERESOLVE overriding peer dependency
npm WARN Found: react@16.14.0
npm WARN node_modules/react
npm WARN   react@"16.14.0" from the root project
npm WARN 
npm WARN Could not resolve dependency:
npm WARN peer react@"^15.5.4" from material-ui-datatables@0.18.2
npm WARN node_modules/material-ui-datatables
npm WARN   material-ui-datatables@"^0.18.2" from the root project
npm WARN ERESOLVE overriding peer dependency
npm WARN Found: react-dom@16.14.0
npm WARN node_modules/react-dom
npm WARN   react-dom@"16.14.0" from the root project
npm WARN 
npm WARN Could not resolve dependency:
npm WARN peer react-dom@"^15.5.4" from material-ui-datatables@0.18.2
npm WARN node_modules/material-ui-datatables
npm WARN   material-ui-datatables@"^0.18.2" from the root project
npm WARN ERESOLVE overriding peer dependency
npm WARN Found: react@16.14.0
npm WARN node_modules/react
npm WARN   react@"16.14.0" from the root project
npm WARN 
npm WARN Could not resolve dependency:
npm WARN peer react@"^15.4.0-0" from react-tap-event-plugin@2.0.1
npm WARN node_modules/react-tap-event-plugin
npm WARN   peer react-tap-event-plugin@"^1.0.0 || ^2.0.0" from material-ui-datatables@0.18.2
npm WARN   node_modules/material-ui-datatables
npm WARN ERESOLVE overriding peer dependency
npm WARN Found: react-dom@16.14.0
npm WARN node_modules/react-dom
npm WARN   react-dom@"16.14.0" from the root project
npm WARN 
npm WARN Could not resolve dependency:
npm WARN peer react-dom@"^15.4.0-0" from react-tap-event-plugin@2.0.1
npm WARN node_modules/react-tap-event-plugin
npm WARN   peer react-tap-event-plugin@"^1.0.0 || ^2.0.0" from material-ui-datatables@0.18.2
npm WARN   node_modules/material-ui-datatables
npm WARN ERESOLVE overriding peer dependency
npm WARN Found: react@16.14.0
npm WARN node_modules/react
npm WARN   react@"16.14.0" from the root project
npm WARN 
npm WARN Could not resolve dependency:
npm WARN peer react@"^15.5.4" from material-ui-search-bar@0.4.2
npm WARN node_modules/material-ui-search-bar
npm WARN   material-ui-search-bar@"^0.4.2" from the root project
npm WARN ERESOLVE overriding peer dependency
npm WARN Found: react@16.14.0
npm WARN node_modules/react
npm WARN   react@"16.14.0" from the root project
npm WARN 
npm WARN Could not resolve dependency:
npm WARN peer react@"^15.4.2" from react-addons-css-transition-group@15.6.2
npm WARN node_modules/react-addons-css-transition-group
npm WARN   react-addons-css-transition-group@"^15.2.1" from the root project
npm WARN ERESOLVE overriding peer dependency
npm WARN Found: react@16.14.0
npm WARN node_modules/react
npm WARN   react@"16.14.0" from the root project
npm WARN 
npm WARN Could not resolve dependency:
npm WARN peer react@"^15.7.0" from react-test-renderer@15.7.0
npm WARN node_modules/react-test-renderer
npm WARN   dev react-test-renderer@"15" from the root project
npm WARN ERESOLVE overriding peer dependency
npm WARN Found: pg@8.5.1
npm WARN node_modules/pg
npm WARN   pg@"^8.0.3" from the root project
npm WARN 
npm WARN Could not resolve dependency:
npm WARN peerOptional pg@"^7.18.2" from knex@0.20.15
npm WARN node_modules/knex
npm WARN   knex@"^0.20.7" from the root project
npm WARN ERESOLVE overriding peer dependency
npm WARN Found: react@16.14.0
npm WARN node_modules/react
npm WARN   react@"16.14.0" from the root project
npm WARN 
npm WARN Could not resolve dependency:
npm WARN peer react@"^15.4.0" from material-ui@0.18.0
npm WARN node_modules/material-ui-datatables/node_modules/material-ui
npm WARN   material-ui@"0.18.0" from material-ui-datatables@0.18.2
npm WARN   node_modules/material-ui-datatables
npm WARN ERESOLVE overriding peer dependency
npm WARN Found: react@16.14.0
npm WARN node_modules/react
npm WARN   react@"16.14.0" from the root project
npm WARN 
npm WARN Could not resolve dependency:
npm WARN peer react@"^15.4.0" from material-ui@0.18.0
npm WARN node_modules/material-ui-datatables/node_modules/material-ui
npm WARN   material-ui@"0.18.0" from material-ui-datatables@0.18.2
npm WARN   node_modules/material-ui-datatables
npm WARN ERESOLVE overriding peer dependency
npm WARN Found: react-dom@16.14.0
npm WARN node_modules/react-dom
npm WARN   react-dom@"16.14.0" from the root project
npm WARN 
npm WARN Could not resolve dependency:
npm WARN peer react-dom@"^15.4.0" from material-ui@0.18.0
npm WARN node_modules/material-ui-datatables/node_modules/material-ui
npm WARN   material-ui@"0.18.0" from material-ui-datatables@0.18.2
npm WARN   node_modules/material-ui-datatables
npm WARN ERESOLVE overriding peer dependency
npm WARN Found: react-dom@16.14.0
npm WARN node_modules/react-dom
npm WARN   react-dom@"16.14.0" from the root project
npm WARN 
npm WARN Could not resolve dependency:
npm WARN peer react-dom@"^15.4.0" from material-ui@0.18.0
npm WARN node_modules/material-ui-datatables/node_modules/material-ui
npm WARN   material-ui@"0.18.0" from material-ui-datatables@0.18.2
npm WARN   node_modules/material-ui-datatables
npm WARN ERESOLVE overriding peer dependency
npm WARN Found: react@16.14.0
npm WARN node_modules/react
npm WARN   react@"16.14.0" from the root project
npm WARN 
npm WARN Could not resolve dependency:
npm WARN peer react@"^15.4.2" from react-addons-transition-group@15.6.2
npm WARN node_modules/material-ui-datatables/node_modules/react-addons-transition-group
npm WARN   react-addons-transition-group@"^15.4.0" from material-ui@0.18.0
npm WARN   node_modules/material-ui-datatables/node_modules/material-ui
npm WARN ERESOLVE overriding peer dependency
npm WARN Found: react@16.14.0
npm WARN node_modules/react
npm WARN   react@"16.14.0" from the root project
npm WARN 
npm WARN Could not resolve dependency:
npm WARN peer react@"^0.14.0 || ^15.0.0" from react-event-listener@0.4.5
npm WARN node_modules/material-ui-datatables/node_modules/react-event-listener
npm WARN   react-event-listener@"^0.4.5" from material-ui@0.18.0
npm WARN   node_modules/material-ui-datatables/node_modules/material-ui
npm WARN ERESOLVE overriding peer dependency
npm WARN Found: react@16.14.0
npm WARN node_modules/react
npm WARN   react@"16.14.0" from the root project

Just putting this on the radar.

Frydafly commented 3 years ago

Hey @eudaimonstro, I'm not too familiar with this issue, but wanted to ask if using nvm install works in this case?

and then running nvm use each time to ensure you are using the correct version of node?

mau11 commented 2 months ago

Hi @eudaimonstro, we are reviewing outstanding issues. We have updated our node packages in the Spoke v14 release. Please open a new issue if this issue still persists.