-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Fixing docs in response to react-map-gl named export change #9427
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
base: master
Are you sure you want to change the base?
Conversation
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.
Thanks!
@felixpalmer Anything I'm missing to get this merged in? It's been hanging for a bit |
@Pessimistress Anything you need from me to get this merged in? |
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.
Thank you!
@@ -22,7 +22,7 @@ npm install @deck.gl/core @deck.gl/layers @deck.gl/carto | |||
|
|||
```js | |||
import {DeckGL} from '@deck.gl/react'; | |||
import {StaticMap} from 'react-map-gl'; | |||
import {StaticMap} from 'react-map-gl/maplibre'; |
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.
StaticMap
was a component from older versions. It has be replaced by just Map
.
Background
I was working with deck.gl for the first time and wasn't able to get the "getting started" example working. Turns out the latest version of react-map-gl (
8.x
) doesn't export anything from"."
you have to use'react-map-gl/{'mapbox' | 'maplibre' | mapbox-legacy'}
etc.Reproduction instructions
react-map-gl 8.0.1
try to implement the deck.gl react example using usingimport Map from 'react-map-gl'
Internal server error: Failed to resolve entry for package "react-map-gl". The package may have incorrect main/module/exports specified in its package.json: Missing "." specifier in "react-map-gl" package
Additional Context
If you look in
node_modules
the package.json ofreact-map-gl
contains the following:Change List