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

MapBoxGL error #193

Closed
irvingbennett opened this issue Jan 6, 2022 Discussed in #192 · 10 comments
Closed

MapBoxGL error #193

irvingbennett opened this issue Jan 6, 2022 Discussed in #192 · 10 comments

Comments

@irvingbennett
Copy link

irvingbennett commented Jan 6, 2022

Discussed in #192

Originally posted by irvingbennett January 6, 2022
Hi yihong and company! I forked your running page and managed to get it running. It took me some work because it didn't want to build with Gatsby 2.x because some libraries were too old. I managed to get working with Gatsby 4.0 and its going great on my local machine! I really like your app.
I also managed to deploy the app on Vercel and Gatsby Cloud. Both those installations build and run (after some tweaks). Both of those installations fail to show the map and have MapBoxGL errors that can be seen in the developers console:
77e41395-87bb-4f6d-86fc-2386ddd3dbdd:1 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

Have you seen this problem in your deployments?

My running page on Vercel: https://running-page-irving1.vercel.app/
Azure
Gatsby Cloud

@yihong0618
Copy link
Owner

yihong0618 commented Jan 6, 2022

Thanks you like it. Will take a look
I think we should update the dependencies to latest.
@geekplux can you help me about this error~

@yihong0618
Copy link
Owner

Btw, any PR always welcome.

@irvingbennett
Copy link
Author

Thanks yihong! I can make a pull request if you wish. I updated all dependencies, most of them anyway, to be compatible with Gatsby 4.0. I also had to use NPM install instead of Yarn because it kept failing on the install. The Running Page loads beautifully on my local install. It just fails to show something in the map when its built on any of the services mentioned: Gatsby Cloud, Vercel and Azure.
IrvingBennett-heatmap-animation

@yihong0618
Copy link
Owner

Your world map is amazing
@irvingbennett @shaonianche
I created a new branch version_fix please PR here and let's fix the dependicies together.

@irvingbennett
Copy link
Author

Thanks @yihong0618! Please outline the steps for me to create a pull request against version fix. I know github but I mostly use it for my own purposes.

@yihong0618
Copy link
Owner

Thanks @yihong0618! Please outline the steps for me to create a pull request against version fix. I know github but I mostly use it for my own purposes.

https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-a-pull-request

@yihong0618
Copy link
Owner

yihong0618 commented Jan 10, 2022

@irvingbennett seems that is mapbox token problem can you use your own mapbox token and give a try?

can you try this?
mapbox/mapbox-gl-js#10173

@shaonianche
Copy link
Collaborator

shaonianche commented Jan 10, 2022

@irvingbennett earlier in the day, I added the following code to solve this problem, can you try this?

Transpilation of V2.0.0+ #10565
shaonianche/running-data-sync@4419135

"browserslist": {
  "production": [
    ">0.2%",
    "not dead",
    "not op_mini all",
    "not chrome < 51",
    "not safari < 10"
  ],
  "development": [
    "last 1 chrome version",
    "last 1 firefox version",
    "last 1 safari version"
  ]
}

@yihong0618
Copy link
Owner

@irvingbennett we updade all the version can you give a test?

@irvingbennett
Copy link
Author

irvingbennett commented Feb 10, 2022

Hi Yihong! I will give it a spin and see how it goes.

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

3 participants