question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Webpack 5.1.3 chunk.files.delete

See original GitHub issue

I’m getting this error when running production build with with FixStyleOnlyEntriesPlugin. Should I provide some more info?

HookWebpackError: chunk.files.delete is not a function
    at makeWebpackError (/home/vagrant/code/perkam/perkamkopa/node_modules/webpack/lib/HookWebpackError.js:49:9)
    at /home/vagrant/code/perkam/perkamkopa/node_modules/webpack/lib/Compilation.js:1995:11
    at eval (eval at create (/home/vagrant/code/perkam/perkamkopa/node_modules/webpack/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:17:1)
    at processTicksAndRejections (internal/process/task_queues.js:94:5)
-- inner error --
TypeError: chunk.files.delete is not a function
    at Compilation.renameAsset (/home/vagrant/code/perkam/perkamkopa/node_modules/webpack/lib/Compilation.js:2957:23)
    at /home/vagrant/code/perkam/perkamkopa/node_modules/webpack/lib/optimize/RealContentHashPlugin.js:284:21
    at processTicksAndRejections (internal/process/task_queues.js:94:5)
    at async Promise.all (index 2)
    at async /home/vagrant/code/perkam/perkamkopa/node_modules/webpack/lib/optimize/RealContentHashPlugin.js:256:6
caused by plugins in Compilation.hooks.processAssets
TypeError: chunk.files.delete is not a function
    at Compilation.renameAsset (/home/vagrant/code/perkam/perkamkopa/node_modules/webpack/lib/Compilation.js:2957:23)
    at /home/vagrant/code/perkam/perkamkopa/node_modules/webpack/lib/optimize/RealContentHashPlugin.js:284:21
    at processTicksAndRejections (internal/process/task_queues.js:94:5)
    at async Promise.all (index 2)
    at async /home/vagrant/code/perkam/perkamkopa/node_modules/webpack/lib/optimize/RealContentHashPlugin.js:256:6

Issue Analytics

  • State:open
  • Created 3 years ago
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

0reactions
cabralRodrigocommented, Jan 2, 2021

@thesame- I’m facing the same issue, and yes, using [hash] every filename will change on each build.

Read more comments on GitHub >

github_iconTop Results From Across the Web

assets:clean deletes lazy-loaded chunks · Issue #2913
After some investigation, we believe what's going on is during deployment, assets:clean is incorrectly deleting the chunk files for some of the ...
Read more >
Delete unused webpack chunked files
It searches for all updated chunks and deletes obsolete files after ... You can solve the problem № 1 by using remove-files-webpack-plugin.
Read more >
SplitChunksPlugin
Webpack will automatically split chunks based on these conditions: New chunk can be shared OR modules are from the node_modules folder; New chunk...
Read more >
How to Bundle a Simple Static Site Using Webpack
You don't need to be working on a fancy, large-scale project to use Webpack. James Hibbard demonstrates how you can use it to...
Read more >
terser-webpack-plugin/README.md
The CDN for terser-webpack-plugin. ... 129, // Exclude uglification for the `vendor` chunk ... 173, Enable file caching and set path to cache...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found