DeprecationWarning: Module Chunks
See original GitHub issueI’m getting the following warning/error when parsing a bootstrap _variable.scss file. My setup is it’s based on next.js
ERROR Failed to compile with 5 errors
This dependency was not found:
* fs in ./node_modules/mkdirp/index.js, ./node_modules/node-sass/lib/extensions.js and 3 others
To install it, you can run: npm install --save fs
(node:9903) DeprecationWarning: Module.chunks: Use Module.forEachChunk/mapChunks/getNumberOfChunks/isInChunk/addChunk/removeChunk instead
I’m not really whether if is related to this specific module or the sass-extract module, so I raised the same issue there.
Issue Analytics
- State:
- Created 6 years ago
- Comments:8 (2 by maintainers)
Top Results From Across the Web
webpack 3 DeprecationWarning: Chunk.modules is deprecated
I was getting the deprecated warning in the extract-text-webpack-plugin 3.0.0-beta.3 . After I update the extract-text-webpack-plugin to ...
Read more >Module.chunksIterable: Use new ChunkGraph API ... - GitHub
Do you want to request a feature, report a bug or ask a question? Deprecation warning What is the current behavior?
Read more >Compilation Hooks | webpack
Called when the modules id optimization phase has completed. Callback Parameters: modules. reviveChunks. SyncHook. Restore chunk information from records.
Read more >deprecationwarning: compilation.hooks.normalmoduleloader ...
1 I use the npm package service-worker-loader. I get this waring when building the project: node:25260) [DEP_WEBPACK_COMPILATION_CACHE] DeprecationWarning: ...
Read more >Fix deprecation warning when running webpack - GitLab.org
DeprecationWarning : Chunk.modules is deprecated. Use Chunk.getNumberOfModules/mapModules/forEachModule/containsModule instead.
Read more >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
I did some digging on this tonight. I believe the problem comes from importing
sass-extract
since it is not meant to be run in the browser. (It relies on node-sass which relies on fs which doesn’t exist in the browser.)The correct way to make it work (assuming you are also using webpack) is to use sass-extract-loader. Here’s an example:
I’ll have to update the documentation to reflect this.
What if you aren’t using webpack? I am using a gulp compiling process. Is there anyway to use this library with that?