-
-
Notifications
You must be signed in to change notification settings - Fork 585
Closed
Labels
bugSomething isn't workingSomething isn't workingneeds:triageIssues that have not been investigated yet.Issues that have not been investigated yet.scope:nodeRelated to MSW running in NodeRelated to MSW running in Node
Description
Prerequisites
- I confirm my issue is not in the opened issues
- I confirm the Frequently Asked Questions didn't contain the answer to my issue
Environment check
- I'm using the latest
mswversion - I'm using Node.js version 18 or higher
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!
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingneeds:triageIssues that have not been investigated yet.Issues that have not been investigated yet.scope:nodeRelated to MSW running in NodeRelated to MSW running in Node