keplergl / kepler.gl

Kepler.gl is a powerful open source geospatial analysis tool for large-scale data sets.
http://kepler.gl
MIT License
10.41k stars 1.74k forks source link

[Bug] Demo App Basic Install #2465

Open jonbcampos-alto opened 11 months ago

jonbcampos-alto commented 11 months ago

Describe the bug I wanted to run the demo app from master and the dependencies don't resolve with an npm install.

To Reproduce Steps to reproduce the behavior:

  1. Download all the code
  2. Go to examples/demo-app
  3. Run npm i in folder
  4. See error

Expected behavior I would expect the dependencies to resolve.

Desktop (please complete the following information):

Additional context

npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR! 
npm ERR! While resolving: undefined@undefined
npm ERR! Found: react@18.2.0
npm ERR! node_modules/react
npm ERR!   react@"^18.2.0" from the root project
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peer react@"^15.0.0 || ^16.0.0" from react-markdown@4.3.1
npm ERR! node_modules/react-markdown
npm ERR!   react-markdown@"^4.2.2" 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.
jonbcampos-alto commented 11 months ago

Current package:

{
  "scripts": {
    "start": "webpack-dev-server --mode development --progress --hot --open",
    "start-prod": "webpack-dev-server -p --progress --hot --open",
    "start-local": "webpack-dev-server --mode development --env.es6 --progress --hot --open",
    "start-local-deck": "webpack-dev-server --mode development --env.es6 --env.deck --progress --hot --open",
    "start-local-deck-src": "webpack-dev-server --mode development --env.es6 --env.deck_src --progress --hot --open",
    "start-local-loaders-src": "webpack-dev-server --mode development --env.es6 --env.loaders_src --progress --hot --open",
    "start-local-hubble-src": "webpack-dev-server --mode development --env.es6 --env.hubble_src --progress --hot --open",
    "start-local-https": "webpack-dev-server --mode development --https --env.es6 --progress --hot --open"
  },
  "dependencies": {
    "@auth0/auth0-spa-js": "^2.1.2",
    "@carto/toolkit": "0.0.1-rc.18",
    "@kepler.gl/actions": "^3.0.0-alpha.1",
    "@kepler.gl/components": "^3.0.0-alpha.1",
    "@kepler.gl/constants": "^3.0.0-alpha.1",
    "@kepler.gl/processors": "^3.0.0-alpha.1",
    "@kepler.gl/reducers": "^3.0.0-alpha.1",
    "@kepler.gl/styles": "^3.0.0-alpha.1",
    "d3-request": "^1.0.6",
    "dropbox": "^4.0.12",
    "global": "^4.3.0",
    "lodash.debounce": "^4.0.8",
    "lodash.get": "^4.4.2",
    "react": "^18.2.0",
    "react-copy-to-clipboard": "^5.0.1",
    "react-dom": "^18.2.0",
    "react-markdown": "^4.2.2",
    "react-palm": "^3.3.6",
    "react-redux": "^8.0.5",
    "react-router": "3.2.5",
    "react-router-redux": "^4.0.8",
    "react-virtualized": "^9.21.0",
    "redux-actions": "^2.2.1",
    "redux-thunk": "^1.0.0",
    "styled-components": "^4.1.3"
  },
  "devDependencies": {
    "@babel/core": "^7.12.1",
    "@babel/plugin-proposal-class-properties": "^7.12.1",
    "@babel/preset-env": "^7.12.1",
    "@babel/preset-react": "^7.12.1",
    "@babel/preset-typescript": "^7.16.7",
    "babel-loader": "^8.0.0",
    "webpack": "^4.29.0",
    "webpack-cli": "^3.2.1",
    "webpack-dev-middleware": "^3.5.1",
    "webpack-dev-server": "^3.1.14",
    "webpack-hot-middleware": "^2.24.3"
  },
  "resolutions": {
    "@luma.gl/core": "8.5.20",
    "@luma.gl/webgl": "8.5.20",
    "@deck.gl/core": "8.9.27",
    "@deck.gl/extensions": "8.9.27",
    "react-vis": "1.11.7"
  }
}
exrhizo commented 11 months ago

I was seeing that with the latest version of react-palm so it doesn't look like that will be able to be fixed easily..

npm i --legacy-peer-deps allows the install to continue

npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR! 
npm ERR! While resolving: kepler-embed@0.1.0
npm ERR! Found: react@18.2.0
npm ERR! node_modules/react
npm ERR!   react@"^18.2.0" from the root project
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peer react@"0.13.x || 0.14.x || ^15.0.0-0 || ^16.0.0-0" from enzyme-adapter-utils@1.14.1
npm ERR! node_modules/enzyme-adapter-utils
npm ERR!   peer enzyme-adapter-utils@"^1.13.0" from react-palm@3.3.8
npm ERR!   node_modules/react-palm
npm ERR!     react-palm@"^3.3.8" from the root project
jonbcampos-alto commented 11 months ago

@exrhizo thanks, that does help me move forward a bit. sad that react-palm will be problematic.

aditya2712 commented 7 months ago

This issue can be resolved if we install the dependency using --legacy-peer-deps flag.

That is, instead of npm install simply do npm install --legacy-peer-deps.