Skip to content
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

Unable to resolve file when using React Native #61

Closed
shafarizkyf opened this issue Dec 27, 2023 · 7 comments · May be fixed by #344
Closed

Unable to resolve file when using React Native #61

shafarizkyf opened this issue Dec 27, 2023 · 7 comments · May be fixed by #344

Comments

@shafarizkyf
Copy link

Hi guys,
I'm facing an issue when using React Native. The cause is that this library uses 'import '.js'' while the file itself is '.ts'. This doesn't happen when using plain Node.js. Could you please advise on how to resolve this? Thank you.

image
@plusminushalf
Copy link
Contributor

Do you have some boilerplate code that you can help me with this?

@shafarizkyf
Copy link
Author

Do you have some boilerplate code that you can help me with this?

thank you for your swift response.
hopefully this helps: https://github.com/shafarizkyf/react-native-miza/tree/permissionless

after the onboarding screen it should navigate to login and crash (because this import line)

@plusminushalf
Copy link
Contributor

plusminushalf commented Jan 7, 2024

This looks like not all platforms support the exports in package.json.

For example, It is still experimental in Metro - facebook/metro#670

How to have a temp fix for the project - https://reactnative.dev/blog/2023/06/21/0.72-metro-package-exports-symlinks#package-exports-support-beta

Or:

 import { ... } from 'permissionless/_esm/..' instead of just from 'permissionless' if that helps for the future

^ I know this is bad fix I am looking into better fix or enable the experimental feature.

@shafarizkyf
Copy link
Author

This looks like not all platforms support the exports in package.json.

For example, It is still experimental in Metro - facebook/metro#670

How to have a temp fix for the project - https://reactnative.dev/blog/2023/06/21/0.72-metro-package-exports-symlinks#package-exports-support-beta

Or:

 import { ... } from 'permissionless/_esm/..' instead of just from 'permissionless' if that helps for the future

^ I know this is bad fix I am looking into better fix or enable the experimental feature.

thank you, for now I'm using permissionless/_esm/.. solution

@emzet93
Copy link

emzet93 commented Jan 29, 2024

Hey @plusminushalf, is there any progress on it? 🙏

@Kyle772
Copy link

Kyle772 commented Dec 19, 2024

+1 I think it is possible to provide RN support here given the above work around by @plusminushalf

@ialmanzaj
Copy link

+1 same error

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants