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

webpack 5 not supported? #314

Open
alonmeiri opened this issue Feb 16, 2021 · 5 comments
Open

webpack 5 not supported? #314

alonmeiri opened this issue Feb 16, 2021 · 5 comments

Comments

@alonmeiri
Copy link

Hi, I recently upgraded project webpack from version 4.46.0 to 5.21.0 and there seems to be a build issue with react-map-gl compatibility.
I had version react-map-gl version 5.2.7 installed, and working fine, after upgrading webpack the project doesn't build , when upgrading to any newer react-map-gl version either.
What changes are needed in the configuration in order to build with webpack 5?

@stepankuzmin
Copy link
Member

Hi @alonmeiri

Could you please provide build error logs?

@alonmeiri
Copy link
Author

alonmeiri commented Feb 16, 2021

Hi, thanks for the quick reply

here is an example log, I am getting a bunch of these :

ERROR in ./node_modules/react-map-gl/node_modules/@babel/runtime/helpers/esm/toConsumableArray.js 4:0-52
Module not found: Error: Can’t resolve ‘./nonIterableSpread’ in ‘/Users/sahara/git/dview/client/node_modules/react-map-gl/node_modules/@babel/runtime/helpers/esm’
Did you mean ‘nonIterableSpread.js’?
BREAKING CHANGE: The request ‘./nonIterableSpread’ failed to resolve only because it was resolved as fully specified
(probably because the origin is a ‘.mjs’ file or a ‘.js’ file where the package.json contains ‘“type”: “module”’).
The extension in the request is mandatory for it to be fully specified.
Add the extension to the request.
@ ./node_modules/react-map-gl/dist/esm/components/interactive-map.js 2:0-78 369:41-59
@ ./node_modules/react-map-gl/dist/esm/index.js 1:0-55 1:0-55 2:0-73 2:0-73
@ ./src/components/map_component/mapbox.js 18:42-65
@ ./src/components/dashboard_pages/level_pages/factory_level/factory_page.js 22:37-77
@ ./src/components/dashboard_pages/level_pages/factory_level/factory_page_container.js 18:43-68
@ ./src/components/dashboard_pages/dashboard_page.js 16:53-139
@ ./src/components/site_page/site_page.js 36:45-89
@ ./src/components/site_page/site_page_container.js 22:40-62
@ ./src/App.js 16:50-101
@ ./src/index.js 9:34-50
16 errors have detailed information that is not shown.
Use ‘stats.errorDetails: true’ resp. ‘--stats-error-details’ to show it.

@stepankuzmin
Copy link
Member

Hi @alonmeiri 👋

Could you please try reproducing it with the latest release v1.16.1?

@anboch
Copy link

anboch commented Oct 21, 2022

Hi @stepankuzmin
Trying to install and use the library in my react project, I've run into a bunch of errors (logs.txt). I've repeated the installations on clean builds (create-react-app), but the errors persisted. Maybe there are ideas how to fix it?
p.s. I managed to remove some errors by installing assert, path, util packages. But other errors still remain.

UPD. Sorry for disturbing. I solved the issue. For those who will have problems during a build, pay attention to this.

@joy-mollick
Copy link

Still compilation error with webpack5+. But no proper guide to fix this issue !! lots of error occured during build with webpack 5+

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

4 participants