-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Console errors when using Mapbox GL 3 (Babel related) #12907
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
Comments
Hi @matbmapspeople, Could you please provide a minimal setup to help us address the issue? |
Hey @stepankuzmin Thank you for the reply. I tried to create an online editor example, but I had some issues setting up proper dependencies. Repo: https://github.com/matbmapspeople/mapbox-gl-playground I hope that's acceptable and we can move on with it. |
I am also experiencing this same issue with v3 within angular. |
Update: it does not work on any beta releases (1-4) |
@matbmapspeople, it seems that you are still transpiling GL JS in your setup. At least |
@stepankuzmin If it works on the non-beta version, should we not assume the issue is with the new beta version and not the configuration of our transpiling handling? |
It seems that the same error occurred in MapLibre maplibre/maplibre-gl-js#3210. As far as I can see, Angular is forcing the transpilation to occur because angular/angular-cli#25708 We should look into different options to resolve this issue. /cc @mourner |
@stepankuzmin short term the easiest is probably simply rewriting the |
We shipped a fix to this internally — will be a part of the final v3 release. |
Thank you for the response and fix @mourner and @stepankuzmin . Looking forward to final v3 release 👏 |
mapbox-gl-js version: v3.0.0-beta.3
browser: Chrome, Safari, Firefox
Steps to Trigger Behavior
I tried to run Mapbox GL beta3 in my web app.
App uses:
Angular CLI: 13.3.11
Node: 16.13.2
Package Manager: npm 8.1.2
Angular: 13.3.6
webpack.config.js includes:
Expected Behavior
No errors, running map.
Actual Behavior
I followed migration guide to run the latest release of the new Mapbox GL 3 (beta3). I encountered some console errors that were related to the code that I am using. I commented my code out to make the map appear. Unfortunately, there are two console errors that for some reason I am not able to solve:
Before I was using Mapbox GL 2 and everything worked in this case. Also I explicitly told the bundler to exclude node_modules when using Babel (webpack.config.js), but it did not work out.
Do you have any ideas or approach that might help me solving this problem?
The text was updated successfully, but these errors were encountered: