Critical dependency: require function is used in a way in which dependencies cannot be statically extracted
See original GitHub issueHi I’m getting these errors when trying to run a fresh install.
Cesium loads for a second or two, then these errors pop up in the console, and Cesium exits.
140:80-87 Critical dependency: require function is used in a way in which dependencies cannot be statically extracted
@ ./node_modules/cesium/Source/Core/TaskProcessor.js
@ ./node_modules/cesium/Source/Core/QuantizedMeshTerrainData.js
@ ./node_modules/cesium/Source/Core/CesiumTerrainProvider.js
@ ./node_modules/cesium/Source/Cesium.js
@ ./src/index.js
@ multi (webpack)-dev-server/client?http://localhost:8080 ./src/index.js
WARNING in ./node_modules/cesium/Source/Core/buildModuleUrl.js
57:15-22 Critical dependency: require function is used in a way in which dependencies cannot be statically extracted
@ ./node_modules/cesium/Source/Core/buildModuleUrl.js
@ ./node_modules/cesium/Source/Cesium.js
@ ./src/index.js
@ multi (webpack)-dev-server/client?http://localhost:8080 ./src/index.js
WARNING in ./node_modules/cesium/Source/Core/buildModuleUrl.js
77:77-84 Critical dependency: require function is used in a way in which dependencies cannot be statically extracted
@ ./node_modules/cesium/Source/Core/buildModuleUrl.js
@ ./node_modules/cesium/Source/Cesium.js
@ ./src/index.js
@ multi (webpack)-dev-server/client?http://localhost:8080 ./src/index.js
Issue Analytics
- State:
- Created 6 years ago
- Reactions:2
- Comments:6 (2 by maintainers)
Top Results From Across the Web
Critical dependency: require function is used in a way in which ...
Critical dependency : require function is used in a way in which dependencies cannot be statically extracted · Subscribe to RSS.
Read more >Critical dependency: require function is used in a way ... - GitHub
The error originates from the esm target, which should not have any require statements. It'd be nice to explore that built module and...
Read more >Incompatible with Webpack - Google Groups
"require function is used in a way, in which dependencies cannot be statically extracted" These errors come when trying to "require" specific modules, ......
Read more >Node.js – WARNING in Critical dependency: require function ...
Node.js – WARNING in Critical dependency: require function is used in a way in which dependencies cannot be statically extracted. angularnode.jswebpack.
Read more >Critical dependency: require function is ... - Auth0 Community
Error message : Critical dependency: require function is used in a way in which dependencies cannot be statically extracted.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Since Cesium has branching ways to build paths to modules, when webpack compiles it will throw these warnings, however everything is still working as expected.
Setting the following configurations will suppress the warnings:
Make sure you check WebGL compatibility on your machine. I’ll close this, feel free to reopen if it is indeed the webpack configuration causing the problem.