Closed cxc421 closed 2 years ago
In package.json
file, devDependencies
package msw
version ^0.39.2
is used
It will install at least msw
version 0.45.0
on your computer
and then you will receive as sub dependency newer headers-polyfill
version 3.1.0
instead of 3.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 of exports
will break your npm installation
"exports": {
".": {
"types": "./lib/index.d.ts",
"require": "./lib/index.js",
"default": "./lib/esm/index.js"
}
}
just delete package-lock.json
and update manually msw
to version 0.47.3
and reinstall all other packages
rm -f -R node_modules
rm -f package-lock.json
npm install msw@0.47.3
npm install
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
I'm trying to push a "Pull request" but it will be my first attempt in my dev life and it will take some time
Happy codding :)
Thanks for the PR!
Hi, I followed the steps below based on your course on egghead.
npx create-remix --template remix-run/indie-stack onewheel-blog
cd onewheel-blog
npm run dev
Then the following error message appears.
Node version: 16.17.0 npm version: 8.15.0 platform: Ubuntu-22.04