-
-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
> 3 | import __node_cjsModule from 'node:module'; #112
Comments
This issue appears when using the esm build of react-native-magic-modal which is picked up on expo projects when turning on The esm build itself seems faulty such that it ends up using the There's only one line of require here. Since react-native-screens will always be there anyway for all platforms, I wonder if just using a traditional import will be a simpler fix. A workaround for expo users now while leaving
This makes expo pick-up the commonjs version first. |
Thanks for pinpointing! I agree with the solution. Will spin up a quick PR. |
Fixed, let me know if it solves this for you! |
error: Error: Unable to resolve module node:module from /Users/xxx/node_modules/react-native-magic-modal/dist/index.js: node:module could not be found within the project or in these directories:
node_modules/react-native-magic-modal/node_modules
node_modules
../../node_modules
1 | import React, { Fragment, useMemo, memo, useCallback, useEffect, useImperativeHandle } from 'react';
2 | import { Platform, StyleSheet, Pressable, useWindowDimensions, View, BackHandler } from 'react-native';
The text was updated successfully, but these errors were encountered: