-
-
Notifications
You must be signed in to change notification settings - Fork 810
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Not working with expo #468
Comments
Did you foolow that steps? https://github.com/ai/nanoid?tab=readme-ov-file#react-native |
Yes, I did |
Sorry, I have no idea or experience with Expo. Try to ask Expo community. |
I think the issue is here: In version 3 only the required function Line 1 in 89d82d2
|
Nope, those are different files. Sync and async. |
Async was removed in v5, right? |
Yes |
So what is the status for expo compatibility? |
Yes, it should work. This doc was written by Expo user. |
Can I contact them? |
I don’t think it is polite. You should use StackOverflow and similar things if you want ask others to do your work. Try also import |
I don't think it's impolite to contact the maintainer of a library. |
I am the maintainer. You want to contact some other developer who send PR to the library. |
Anyway, how can I do this?
|
This is just a type warning not an error. Does it works? |
It works, with |
Try the new Nano ID 5.0.6 with normal |
It doesn't work, unfortunately. It's still using './index.js'. |
And I guess the release should include a ./index.browser.d.ts file to solve the error I got with TS. |
Separeted manual import for browser version is not a long-term solution because you can't change import inside other libraries. It was only a test. |
I tried this patch but without a success
Why RN doesn't pick browser.js is a mystery. |
In case anyone is still running into this and this is helpful. We had this problem and had to do 2 separate things to get
(note, we added the
With both of these, we covered all our bases |
The reason was probably my pnpm monorepo setup because it was picking nanoid from the root and not from apps/expo.
@ai I manually patched nanoid package.json with this:
|
Expo SDK: 49.0.0
After following the instructions at https://github.com/ai/nanoid#react-native , I get:
The text was updated successfully, but these errors were encountered: