-
-
Notifications
You must be signed in to change notification settings - Fork 3
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
Bug: Unable to resolve "@logto/client/shim" from "node_modules/@logto/rn/lib/index.js" #20
Comments
There might be some linking problems with |
I'll take a look on it. It seems somehow the resolver doesn't honor the |
Which RN/Expo version are you using? |
Using RN0.73.4 and expo 50.0.11 |
any progress in this? I am also facing the same issue. |
same issue here expo sdk50 any progress? |
Same problem, any update? expo: 50.0.14 |
same issue, is this repo still being maintained? any update about this? |
same problem here, any updates? |
I did some exploration, and finally solved this issue, this is not working because react native does not support package exports by default, I did below config to make it work: in const { getDefaultConfig } = require('expo/metro-config');
// because I am using expo, so have to import expo's
// default metro config, otherwise expo will complain with errors.
const config = getDefaultConfig(__dirname);
config.resolver.unstable_enablePackageExports = true;
module.exports = config; this is the related react native doc: https://reactnative.dev/blog/2023/06/21/package-exports-support |
finally a fix, thanks |
yes i'm working on the update. however i could not reproduce this issue. can you provide a repo for this issue? if i can reproduce it, i'll also do a patch to fix this issue |
@JakimLi thanks for providing the workaround. i'm curious of reproducing this issue because it went just fine on my laptop. even if i change |
Adding this breaks axios for me. [EDIT] |
Is there any fix for this ? |
This has sorted the issue! EDIT: |
Enabling packageExports in the Metro config is necessary to properly load @logto/client/shim. We've updated the integration documentation to include this information. @isener, could you please share the detailed error information here? It seems React Native needs to release a stable version that fully supports npm package exports. |
Works |
Turning this on breaks other packages! |
@dipakparmar can you try the latest 0.4.0 release. We have removed the import of the |
Hey @simeng-li Thanks. Did the quick test and it works. Will do full test later this weekend and let you know. But so far its working. |
Confirming, this is resolved. Can successfully build the app on iOS. |
Describe the bug
@logto/client/shim seems to not be exported from @logto/client and errors.
Expected behavior
No crashes
How to reproduce?
Install @logto/rn and import in the root component.
Context
The text was updated successfully, but these errors were encountered: