-
Notifications
You must be signed in to change notification settings - Fork 14.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(deckgl): deckgl unable to load map #17851
Conversation
@@ -30,7 +30,6 @@ | |||
"dependencies": { | |||
"@superset-ui/chart-controls": "0.18.25", | |||
"@superset-ui/core": "0.18.25", | |||
"mapbox-gl": "^0.53.0", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
from root src/node_module
get this module
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we move these to peerDependencies
to make sure users of the plugin pull in the relevant deps?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mapbox-gl
is a dependency from the react-map-gl
. The root cause for this issue is that mapbox-gl
version is incompatible between legacy-plugin-chart-map-box
and legacy-preset-chart-deckgl
.
When we removed mapbox-gl
in both packages, npm will auto-resolve the conflict. If the user installs those packages as standalone, mapbox-gl
will install by default.
legacy-plugin-chart-map-box
dependencies tree
(superset) yongjie.zhao@:superset-frontend$ npm ls --depth 1 | grep -A 30 'map-box'
....
....
├─┬ @superset-ui/legacy-plugin-chart-map-box@0.18.25 -> ./plugins/legacy-plugin-chart-map-box
│ ├── @superset-ui/chart-controls@0.18.25 deduped -> ./packages/superset-ui-chart-controls
│ ├── @superset-ui/core@0.18.25 deduped -> ./packages/superset-ui-core
│ ├── prop-types@15.7.2 deduped
│ ├─┬ react-map-gl@4.1.16
│ │ ├── @babel/runtime@7.15.4 deduped
│ │ ├── mapbox-gl@0.54.1
│ │ ├── mjolnir.js@2.5.0
│ │ ├── prop-types@15.7.2 deduped
│ │ ├── react-virtualized-auto-sizer@1.0.2 deduped
│ │ ├── react@16.14.0 deduped invalid: "^15.5.4" from node_modules/omnibar
│ │ └── viewport-mercator-project@6.2.3 deduped
│ ├── react@16.14.0 deduped
│ ├─┬ supercluster@4.1.1
│ │ └── kdbush@2.0.1
│ └─┬ viewport-mercator-project@6.2.3
│ ├── @babel/runtime@7.15.4 deduped
│ └── gl-matrix@3.3.0
....
@@ -32,12 +32,10 @@ | |||
"deck.gl": "8.5.2", | |||
"jquery": "^3.4.1", | |||
"lodash": "^4.17.15", | |||
"mapbox-gl": "^2.4.0", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
from root src/node_module
get this module
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Echoing @villebro's comment, we may need this to be a peer dependency so that the plugin continues to work in contexts outside of Superset.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the mapbox-gl
come from react-map-gl
, so we didn't need to add this.
"moment": "^2.20.1", | ||
"mousetrap": "^1.6.1", | ||
"prop-types": "^15.6.0", | ||
"react-bootstrap-slider": "2.1.5", | ||
"react-map-gl": "^6.1.16", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
from root src/node_module
get this module
Codecov Report
@@ Coverage Diff @@
## master #17851 +/- ##
==========================================
- Coverage 66.98% 66.98% -0.01%
==========================================
Files 1609 1609
Lines 64865 64879 +14
Branches 6863 6866 +3
==========================================
+ Hits 43448 43457 +9
- Misses 19553 19556 +3
- Partials 1864 1866 +2
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok makes sense, thanks for the detailed explanation!
* fix(deckgl): deckgl unable to load map * add react-map-gl in peerDependencies
* fix(deckgl): deckgl unable to load map * add react-map-gl in peerDependencies
SUMMARY
Deck.gl unable to load map after migrating to the main repo.
This is due to a conflict between the
react-map-gl
on whichlegacy-preset-chart-deckgl
andlegacy-plugin-chart-map-box
depend.This PR is an emergency fix, and we have to upgrade
react-map-gl
in the futureCurrent dependency tree for those modules
BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
After
Before
TESTING INSTRUCTIONS
ADDITIONAL INFORMATION