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

Module build failed: TypeError: Cannot read property 'thisCompilation' of undefined #10794

Closed
brennanlazzara opened this issue Jun 22, 2021 · 4 comments

Comments

@brennanlazzara
Copy link

Hello, I have a bug to report. I recently update my node modules with NPM I and i am now getting this error which is not allowing the code to compile and the start my application.

Here is the error message in the terminal:

Failed to compile.

./node_modules/mapbox-gl/dist/mapbox-gl-csp-worker.js
Module build failed: TypeError: Cannot read property 'thisCompilation' of undefined

@rreusser
Copy link
Contributor

Hi, @BrennanPredmore. Can you clarify from which version to which version you upgraded? And based on the error message, it sounds like this is a webpack error?

If this is an upgrade from 1.* to 2.*, some approaches to transpiling are explained in the GL-JS docs, and a bit more of the background and motivation is explained in #10565.

We're glad to take a closer look if that doesn't help solve the issue, but it will require additional info about your setup in order to diagnose the issue.

@brennanlazzara
Copy link
Author

I have this version
"mapbox-gl": "^2.1.0",

@rreusser
Copy link
Contributor

Have you had any luck with the instructions, perhaps specifically these instructions for loading the web worker code separately with webpack?

@asheemmamoowala
Copy link
Contributor

@BrennanPredmore Thank you for using Mapbox-GL-JS and for reaching out. As the team requested more information and we haven't heard back in a couple weeks, I'm going to close this issue. If you want to reopen the issue, please provide the information requested in #10794 (comment).

Thank you!

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