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

Packaging for React Native #216

Closed
hoclun-rigsep opened this issue Jun 29, 2021 · 4 comments · Fixed by #217
Closed

Packaging for React Native #216

hoclun-rigsep opened this issue Jun 29, 2021 · 4 comments · Fixed by #217

Comments

@hoclun-rigsep
Copy link

Got another packaging issue for you guys. Using expo and npm:

warn Package @react-rxjs/core has been ignored because it contains invalid configuration. Reason: Package subpath './package.json' is not defined by "exports" in /Users/jim/proj/MDT/node_modules/@react-rxjs/core/package.json

@josepot
Copy link
Member

josepot commented Jun 29, 2021

It looks like this is in fact a problem with RN, not with react-rxjs: react-native-community/cli#1168. Also, according to the following comment:

For a package like uuid which does not contain react-native specific configuration in package.json this is not a problem, but for modules that do contain such config in package.json they will be forced to add package.json to their exports field.

I think that we should be ok? So, if everything works and the only issue is that the user gets a misleading warning, then I would prefer to wait for the RN team to address that issue rather than trying to create a workaround ourselves.

@hoclun-rigsep could you please let us know if -despite that warning- things work correctly?

@josepot
Copy link
Member

josepot commented Jun 29, 2021

On a second thought: I guess that it doesn't hurt to include package.json on the list of exports, I can see how other libraries have done that. So, I guess that we can do the same...

@hoclun-rigsep
Copy link
Author

Okay, when I filed the issue I thought this was fatal, but that was late last night with a crying baby in my arms. It does appear to work despite the warning. Though I see you've patched it already, thank you! Now I can see the patch and see for myself what this issue is about.

@hoclun-rigsep
Copy link
Author

Do you wish me to close this?

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.

2 participants