Skip to content
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

[Bug] unable to run with CRA #2167

Closed
martinjuhasz opened this issue Apr 27, 2023 · 2 comments
Closed

[Bug] unable to run with CRA #2167

martinjuhasz opened this issue Apr 27, 2023 · 2 comments

Comments

@martinjuhasz
Copy link

Description

I'm using CRA with react-app-rewired and somehow when deploying react-map-gl it fails to load the tiles.
The error i see is

An error occurred while parsing the WebWorker bundle. This is most likely due to improper transpilation by Babel; please see https://docs.mapbox.com/mapbox-gl-js/guides/install/#transpiling 4c2326de-1504-4cf4-913b-8260437c626e:1:37
ReferenceError: y is not defined

So it seems that CRA is transpiling mapbox-gl. If i read correctly here, react-map-gl should take care that his doesn't happen. I tried differnt things to exclude it, but without luck.

Any idea why this could happen? I have no imports of mapbox-gl directly in my code, only using react-map-gl.

Any help appreciated

Expected Behavior

mapbox-gl should not be transpiled when using create-react-app

Steps to Reproduce

I tried reproducing this behaviour in a sandbox, but that didn't work

Environment

Logs

No response

@Pessimistress
Copy link
Collaborator

#1266

@Pessimistress Pessimistress closed this as not planned Won't fix, can't repro, duplicate, stale Apr 27, 2023
@Pessimistress Pessimistress removed the bug label Apr 27, 2023
@martinjuhasz
Copy link
Author

oh, well, this issue totally went by my search terms. thanks for this!

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

No branches or pull requests

2 participants