8000 Fixing docs in response to react-map-gl named export change by ironicbrew · Pull Request #9427 · visgl/deck.gl · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

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

Merged
merged 12 commits into from
May 9, 2025

Conversation

ironicbrew
Copy link
Contributor

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

  • Using react-map-gl 8.0.1 try to implement the deck.gl react example using using import Map from 'react-map-gl'
  • Terminal will error with: 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 of react-map-gl contains the following:

  "exports": {
    "./mapbox": {
      "types": "./dist/mapbox.d.ts",
      "require": "./dist/mapbox.cjs",
      "import": "./dist/mapbox.js"
    },
    "./maplibre": {
      "types": "./dist/maplibre.d.ts",
      "require": "./dist/maplibre.cjs",
      "import": "./dist/maplibre.js"
    },
    "./mapbox-legacy": {
      "types": "./dist/mapbox-legacy/index.d.ts",
      "require": "./dist/mapbox-legacy/index.cjs",
      "import": "./dist/mapbox-legacy/index.js"
    }
  },

Change List

  • I updated everywhere in the docs I believe the import to be outdated

@coveralls
Copy link
coveralls commented Feb 17, 2025

Coverage Status

coverage: 91.634%. remained the same
when pulling ee5e43d on ironicbrew:master
into 19961a1 on visgl:master.

Copy link
Collaborator
@felixpalmer felixpalmer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@ironicbrew
Copy link
Contributor Author

@felixpalmer Anything I'm missing to get this merged in? It's been hanging for a bit

@ironicbrew
Copy link
Contributor Author

@Pessimistress Anything you need from me to get this merged in?

Copy link
Collaborator
@Pessimistress Pessimistress left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@chrisgervang chrisgervang merged commit 6cb3f46 into visgl:master May 9, 2025
4 checks passed
felixpalmer pushed a commit that referenced this pull request May 14, 2025
* Update using-with-react.md react-map-gl import

* Update using-with-mapbox.md with new react-map-gl import

* Update mapbox-layers-react.jsx with new react-map-gl import

* Update basemap.md with new react-map-gl import

* Update mapbox-overlay.md with new react-map-gl import

* Update docs/api-reference/carto/basemap.md

---------

Co-authored-by: Chris Gervang <chrisgervang@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants
0