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

Package.json must be exported for React Native on Node >=14 #1312

Closed
heysailor opened this issue Jul 29, 2021 · 0 comments · Fixed by #1313
Closed

Package.json must be exported for React Native on Node >=14 #1312

heysailor opened this issue Jul 29, 2021 · 0 comments · Fixed by #1313

Comments

@heysailor
Copy link
Contributor

heysailor commented Jul 29, 2021

Bug report

Description / Observed Behavior

When imported for a React Native project build on Node >=14, the following warning is displayed:
warn Package swr has been ignored because it contains invalid configuration. Reason: Package subpath './package.json' is not defined by "exports" in <path...>/node_modules/swr/package.json

This occurs as the SWR package.json file is not included in the exports field of package.json. This is a known quirk of using React Native on Node 14, and is under discussion by the community here.

An easy fix is to add package.json to the exports field of the same package.json file.

Expected Behavior

It would be handy if SWR just exported its own package.json file - PR to follow.

Additional Context

SWR version:1.0.0-beta.9

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.

1 participant