Cannot destructure property `tagName` of 'undefined' or 'null'
See original GitHub issueCurrent behaviour 💣
I get the error when I build my project
TypeError: Cannot destructure property `tagName` of 'undefined' or 'null'

Expected behaviour ☀️
It should be built without any errors.
I want to fine-tune which icons to use in the project.
favicons: [
"favicon-16x16.png",
"favicon.ico"
]
But it doesn’t work if I remove the default elements from the array. Or it only works with the inject: false option.
Reproduction Example 👾
https://codesandbox.io/s/tender-jones-obesr?file=/webpack.config.js
Environment 🖥
Node.js v10.23.0
linux 5.4.0-40-generic
+-- favicons@6.2.1
+-- favicons-webpack-plugin@5.0.1
| `-- html-webpack-plugin@5.2.0 deduped
+-- html-webpack-plugin@5.2.0
+-- webpack@5.24.0
`-- webpack-cli@4.5.0
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Cannot destructure property `obj1` of 'undefined' or 'null'
I'm trying to do destructuring in function parameters but I'm getting an error like below, TypeError: Cannot destructure property obj1 of ' ...
Read more >Fix Cannot Set Property of Null Error in JavaScript - YouTube
Check us out at https://www.skillforge.com The " cannot set property of null " error is a very common JavaScript issue that you may...
Read more >ember test throw error - Cannot read property 'tagName' of ...
i have migrated ember 3.16 to 3.24 I struck on ember test error. But the app works fine Chrome 88.0 - [17 ms]...
Read more >[SOLVED] Moralis Streams Error Processing Data
Hey guys, I am trying to destructure the Moralis stream using the following function: export function parseEventData(req: any) { try { const ...
Read more >Uncaught TypeError: Cannot read property of undefined
Out of the six primitive types defined in JavaScript, namely boolean, string, symbol, number, Null, and undefined, no other type throws as ...
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 Free
Top 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

could you backport the bugfix to favicons-webpack-plugin@4 @jantimon
Released in
favicons-webpack-plugin@5.0.2