Replies: 6 comments 5 replies
-
are you importing the node package in a browser build with vite? If you could share some sample repo, it might be helpful to diagnose, as well as versions of node, msw, vite. first guess I'd wonder if that build needs to polyfill node builtins with something like - https://github.com/FredKSchott/rollup-plugin-polyfill-node#readme |
Beta Was this translation helpful? Give feedback.
-
Having the same issue. |
Beta Was this translation helpful? Give feedback.
-
Having the same issue with After uninstalling MSW it works. |
Beta Was this translation helpful? Give feedback.
-
I also have the same issue with today, but I use SvelteKit (SSR for Svelte). I try to solve this problem: Create a file. (e.g. src/polyfills/timers.js)
Add resolve.alias to vite.config.
it works. But I don't know why the following code doesn't work in timers.js 😥
So I hardcode first to fix it. |
Beta Was this translation helpful? Give feedback.
-
Did this ever get fixed? I'm getting the same error, but what is strange is that one workspace works but the other doesn't. |
Beta Was this translation helpful? Give feedback.
-
For those of you coming to this and still having the same issue, turns out there is some polyfill issues that I resolved doing this: TLDR; Installing I'm guessing that it works on my other workspace because I'm not export MSW as part of my build, but rather I'm using it as a dev tool.
|
Beta Was this translation helpful? Give feedback.
-
Updating to latest MSW Version is causing my application build to break. I am getting this error message:
Any idea? i really appreciate help on this.
Beta Was this translation helpful? Give feedback.
All reactions