and voila! npm run dev is working :)
you will have the right headers-polyfill version via the updated msw package and new and well tree-shaked package-lock.json
It's my very first "Pull request" in GitLab so probably I wrote the description it the wrong way.
Explanation of the problem (or at least my understanding of it)
In
package.json
file,devDependencies
packagemsw
version^0.39.2
is used It will install at leastmsw
version0.45.0
on your computer and then you will receive as sub dependency newerheaders-polyfill
version3.1.0
instead of3.0.4
here is the diff that causes the problem: https://github.com/mswjs/headers-polyfill/compare/v3.0.4...v3.1.0#diff-7ae45ad102eab3b6d7e7896acd08c427a9b25b346470d7bc6507b6481575d519R8 a new declaration ofexports
will break your npm installationSolution
just delete
package-lock.json
and update manuallymsw
to version0.47.3
and reinstall all other packagesand voila!
npm run dev
is working :) you will have the rightheaders-polyfill
version via the updatedmsw
package and new and well tree-shakedpackage-lock.json
It's my very first "Pull request" in GitLab so probably I wrote the description it the wrong way.
PS. - related to the reported problem When executing "npm run dev" there will be an error message. #5 that I stepped on the same landmine yesterday and managed to "solve" it today