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.

Cannot read property 'alwaysWriteToDisk' of undefined

See original GitHub issue

After upgrading webpack@5.1.2, webpack-cli@4.0.0 and html-webpack-plugin@5.0.0-alpha.3, I have the following error when building in production / development mode

TypeError: Cannot read property 'alwaysWriteToDisk' of undefined
    at HtmlWebpackHarddiskPlugin.writeAssetToDisk (C:\Users\tdarneix\Development\centreon-dev-ecosystem-wp5\centreon\node_modules\html-webpack-harddisk-plugin\index.js:46:33)
    at C:\Users\tdarneix\Development\centreon-dev-ecosystem-wp5\centreon\node_modules\html-webpack-harddisk-plugin\index.js:27:16
    at eval (eval at create (C:\Users\tdarneix\Development\centreon-dev-ecosystem-wp5\centreon\node_modules\html-webpack-plugin\node_modules\tapable\lib\HookCodeFactory.js:74:10), <anonymous>:15:1)       
    at new Promise (<anonymous>)
    at Hook.eval [as promise] (eval at create (C:\Users\tdarneix\Development\centreon-dev-ecosystem-wp5\centreon\node_modules\html-webpack-plugin\node_modules\tapable\lib\HookCodeFactory.js:74:10), <anonymous>:4:8)
    at Hook.PROMISE_DELEGATE [as _promise] (C:\Users\tdarneix\Development\centreon-dev-ecosystem-wp5\centreon\node_modules\html-webpack-plugin\node_modules\tapable\lib\Hook.js:22:14)
    at C:\Users\tdarneix\Development\centreon-dev-ecosystem-wp5\centreon\node_modules\html-webpack-plugin\index.js:341:89
    at runMicrotasks (<anonymous>)

Does the alwaysWriteToDisk is still available on html-webpack-plugin ? Is there a way to wirte assets to disk no matter the build type ?

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
jantimoncommented, Oct 16, 2020

Can you please try html-webpack-plugin@5.0.0-alpha.5 ?

0reactions
jantimoncommented, Oct 16, 2020

Cool thanks for testing 👍

Read more comments on GitHub >

github_iconTop Results From Across the Web

Cannot read property 'tapAsync' of undefined #63 - GitHub
Got the error "Cannot read property 'tapAsync' of undefined" ... filename: 'layout.pug', alwaysWriteToDisk: true, // other config }) ...
Read more >
Webpack: TypeError: Cannot read property ... - Stack Overflow
Webpack: TypeError: Cannot read property 'properties' of undefined · it works fine for me, can you clarify which script gives the error? What ......
Read more >
html-webpack-plugin - npm
This is a webpack plugin that simplifies creation of HTML files to serve your webpack bundles. This is especially useful for webpack bundles ......
Read more >
Webpack HtmlWebpackPlugin removes DOM elements-Reactjs
... Cannot apply text-align to Material UI Input Component, but everything else works · WebpackError: Cannot read property 'node' of undefined ...
Read more >
Cannot read property 'get' of undefined : r/node - Reddit
Cannot read property 'get' of undefined. Hi, i am making a discord bot in java script. I am trying to use a command...
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