Prerequisites
Environment check
Node.js version
21.1.0
Reproduction repository
https://github.com/Cocolis-1/blank-expo/tree/feat/msw
Reproduction steps
Try to start the bundler using yarn start and start your dev client.
Current behavior
You should see the following error:
iOS Bundling failed
The package at "node_modules/msw/lib/native/index.js" attempted to import the Node standard library module "events".
It failed because the native React runtime does not include the Node standard library.
Learn more: https://docs.expo.dev/workflow/using-libraries/#using-third-party-libraries
Expected behavior
MSW should not depend on node:events (if possible) so that React Native users can use it.
I think the commit introducing node:events is this one.
Let me know if I can help in any way!
Thanks!
Prerequisites
Environment check
mswversionNode.js version
21.1.0
Reproduction repository
https://github.com/Cocolis-1/blank-expo/tree/feat/msw
Reproduction steps
Try to start the bundler using yarn start and start your dev client.
Current behavior
You should see the following error:
Expected behavior
MSW should not depend on node:events (if possible) so that React Native users can use it.
I think the commit introducing node:events is this one.
Let me know if I can help in any way!
Thanks!