For some strange reason, Webpack incorrectly attempts to import named imports as default. I noticed the problem when I tried to build my project in a docker container. I got the following error:
I also tried building the project directly on my mac and it was initially built successfully. But after deleting my node_modules
folder and running npm install
afresh, my project stopped compiling. It started to throw the same error:
My package.json file didn't change in any way and all my packages have fixed (exact) versions. I've tried updating babel and all its plugins and even tried to build the last commit that successfully built two weeks ago but all to no avail.
I still can't understand why my project won't compile anymore if absolutely nothing changed. Did something change on the npm registry?
Is anyone else experiencing a similar problem? Any ideas on how to solve it?