Webpack: "require function is used in a way in which dependencies cannot be statically extracted"
See original GitHub issue[X] Bug
CountUp.js version: v2.0.0
Description
- Building the application with webpack, I get the following warning in the output logs:
WARNING in ./node_modules/countUp.js/dist/countUp.min.js 1:328-335 Critical dependency: require function is used in a way in which dependencies cannot be statically extracted
Issue Analytics
- State:
- Created 5 years ago
- Comments:19 (10 by maintainers)
Top Results From Across the Web
require function is used in a way in which dependencies ...
25:24-31 Critical dependency: require function is used in a way in which dependencies cannot be statically extracted.
Read more >Critical dependency: require function is used in a way in which ...
I got this error and found this: https://fluin.io/blog/critical-dependency-cannot-be-statically-extracted, where the author shows he was ...
Read more >HELP! WebPack Weirdness: "require function is used in a way ...
HELP! WebPack Weirdness: "require function is used in a way in which dependencies cannot be statically extracted".
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 >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 >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
@CPelletier I got this error from ESLint and fixed it after adding ignore rule for whole file. But after install version 2.0.1 it just works good without any errors
In that case I would like to change the module wrapping to AMD and cut another release. Although we know commonjs works well with webpack, it’s a node module wrapper and not optimized for browser usage… I was not able to use it in my demo with just requirejs. I’m sure if I googled and troubleshooted long enough I’d eventually figure out a way but it shouldn’t be that hard for everyone else. AMD works well with just requirejs; in fact requirejs recommends AMD. So if it’s compatible with webpack lets go with AMD. I’ll close after I release with AMD.