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.

TypeError: Invalid value used in weak set

See original GitHub issue
  • Operating System: MacOS Big Sur 11.1
  • Node Version: v10.16.3
  • NPM Version: 6.9.0
  • webpack Version: 4.44.2
  • mini-css-extract-plugin Version: 2.0.0

Expected Behavior

Npm run build succeed

Actual Behavior

TypeError: Invalid value used in weak set at WeakSet.add (<anonymous>) at MiniCssExtractPlugin.apply (/Users/grzegorztarnowski/***/***/web/node_modules/mini-css-extract-plugin/dist/index.js:362:18)

Code

webpack.common.js

https://gist.github.com/gtarnowski/8c3bd7ca346bb15af5913d586efb3fd4

package.json

https://gist.github.com/gtarnowski/828fe24c13304376677e93c0e72bdc75

How Do We Reproduce?

Error shows on npm run build process. After downgrading mini-css-extract-plugin to version 1.6.2 - error disappear. The error appears in the new version, so I report it.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:8
  • Comments:12 (6 by maintainers)

github_iconTop GitHub Comments

35reactions
gtarnowskicommented, Jul 3, 2021

You need webpack v5 to use the 2.0.0 version, please read the changelog before update, I really don’t understand why the developers don’t do it, it is major release so breaking changes expected

Some less experienced developers (like me) can didn’t know that changelog can include such information. But im glad that you give me a lesson in such kind way.

24reactions
alexander-akaitcommented, Jul 1, 2021

You need webpack v5 to use the 2.0.0 version, please read the changelog before update, I really don’t understand why the developers don’t do it, it is major release so breaking changes expected

Read more comments on GitHub >

github_iconTop Results From Across the Web

Invalid value used in weak set" while build using webpack ...
I'm trying to add scss to the project. I want to build css files from scss ones, but I get an error that...
Read more >
WeakSet.prototype.add() - JavaScript - MDN Web Docs - Mozilla
expected output (Chrome): TypeError: Invalid value used in weak set. 13. // expected output (Firefox): TypeError: WeakSet value must be an object, got...
Read more >
JavaScript Demo: WeakSet.Prototype.add() - Mozilla
expected output (Chrome): TypeError: Invalid value used in weak set. 13. // expected output (Firefox): TypeError: WeakSet value must be an object, got...
Read more >
weakSet.add - JavaScript - W3cubDocs
expected output (Chrome): TypeError: Invalid value used in weak set. 13. // expected output (Firefox): TypeError: WeakSet value must be an object, got...
Read more >
Weak Maps - ECMAScript Wiki
WeakMap s help developers avoid memory leaks by holding references to their ... TypeError: Invalid value used as weak map key let wmk...
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