79815976

Date: 2025-11-10 18:49:14
Score: 0.5
Natty:
Report link

It won't let me comment on the answer that worked for me, but I need to add context.

If you have "type": "commonjs", in your package.json, remove it helped me with same error

I've been trying to learn webpack lately and keep running into the same error in every tutorial. The difference is that with npm init -y the package.json file now adds a default "type": "commonjs" ; I guess it didn't before. I still don't understand why there are 3 states to this setting when declaring it only gives you 2 options, but "null" or not having the setting is the winner.

Reasons:
  • Blacklisted phrase (0.5): I need
  • Whitelisted phrase (-1): worked for me
  • RegEx Blacklisted phrase (1): It won't let me comment
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Josh Brooker