-
Notifications
You must be signed in to change notification settings - Fork 24.3k
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
How to install or use a package in a library project #22464
Comments
It looks like you are using an older version of React Native. Please update to the latest release, v0.57 and verify if the issue still exists. The "⏪Old Version" label will be removed automatically once you edit your original post with the results of running |
sorry. i thought the issues section is also for backward support. seems like i'm wrong. actually, this issue has nothing to do with react native version of the application project. because the error occurs in the library project, which i can't run
it's ok. no hard feeling. i'll do as per your request. thank you for your reply |
finally managed to compile with latest version. but my apologize i cannot edit my post. because metro bundler does not lists all the project directories like when i compile with version as i state in the post, like this ...
... followed by error since this error has nothing to do with the issue, i think the best is to not include it into the post. if someone want to open new issue for this, it's your call. |
We are using GitHub issues exclusively to track bugs in React Native. GitHub may not be the ideal place to ask a question, but you can try asking over on Stack Overflow, or on Reactiflux. You may also use discuss.reactjs.org/ to discuss best practices. |
I've put my answer here ... including some complaints about how bad react native team do their job 😆 |
(If I doing this, I doubt I will get here to submit this issue 😆 )
Environment (
react-native info
)Environment:
Packages: (wanted => installed)
Description
In a library project, how actually the proper way to install or simply and directly use a module package?
Reproducible Demo
react
andreact-native
. So errorUnable to resolve module
will come out when you trying to import it in a.js
Component
. Try to add packageyarn add react --save
and import it from a.js
react-native run-android
from a linked application project directoryWhat have you (me) tried ???
Please. I know the why I found this error. But that's not the answer I wanna know. I'm just looking for how to install and use a package in linked external project. That's all. Nothing more and nothing less 😄
The text was updated successfully, but these errors were encountered: