-
-
Notifications
You must be signed in to change notification settings - Fork 56
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
React Native: Package subpath './package.json' is not defined by "exports" #1054
Comments
Hi @brianlenz, do you know why the |
Hi @fb55, honestly, I don't fully understand the background, but from the issue I linked, here's the explanation:
And then there is further background provided in a comment here: react-native-community/cli#1168 (comment) Given that the issue has been open in React Native for years, it seems there isn't a resolution coming on their end anytime soon. Most other projects in this situation have addressed the problem as I addressed it in the PR here (which you can see by all of the links to other projects in the issue). Since React Native is such a popular framework, I figured it would be best for |
I will follow Sindre's lead here (react-native-community/cli#1168 (comment)), and won't be adding the |
@fb55, bummer, that's too bad. I guess we are stuck patching your package for the foreseeable future 😩 For anyone else who comes here with the same issue, you can use this patch file to fix it (either with Yarn 2 patch or patch-package):
|
Is there a particular feature you need from the 3.x releases? Staying on an older version seems like much simpler solution here — but don't let me stop you from doing what's best for you. |
@fb55, I appreciate the consideration and help! 🙏 In our case, it's a transitive dependency that we don't have direct control over. I suppose forcing a downgrade through resolution may work, but it doesn't seem like a particularly good idea. It may not ultimately matter, as it looks like react-native-cli may actually be addressing the root cause, though! Just now: react-native-community/cli#1655 Glad to see after 2+ years 😁 |
When using domutils v3 in a React Native project, you'll get a warning when building:
This is something that has been reported for multiple packages in React Native here:
react-native-community/cli#1168
Each individual package maintainer has the ability to work around the issue, however, by simply exporting package.json. I'll submit a PR to do this and leave it up to you @fb55 if you'd like to merge.
The text was updated successfully, but these errors were encountered: