Skip to content

Conversation

@sthota-fms
Copy link

@sthota-fms sthota-fms commented Feb 23, 2023

Need to export package.json for react-native project.

Please view this issue for further details.

Need to export package.json for react-native project.
@fb55
Copy link
Member

fb55 commented Feb 23, 2023

Not sure I understand why one would want to import the package.json file. Could you elaborate?

@sthota-fms
Copy link
Author

When I try to install cheerio, I get this warning in my console.

image

Therefore, it's expecting ./package.json.

@fb55
Copy link
Member

fb55 commented Feb 23, 2023

Seems like this has been fixed: react-native-community/cli#1655

Feel free to use a pre-ESM version of cheerio while you are unable to upgrade (have a look through the releases on GitHub to see which one introduced it).

Closing this as I don't see a need to work around fixed bugs in external tooling — hope that makes sense!

@fb55 fb55 closed this Feb 23, 2023
@michaelfaith
Copy link

michaelfaith commented Jul 23, 2024

@fb55 Weighing in here. It's generally good practice to include an export for the package.json so that tooling can use it. For instance, an app that wants to dynamically display what versions of open source packages its using for legal reporting, can do that easily by loading the package.jsons of its dependencies. This seems like an easy thing to add, with no real downside.

@fb55
Copy link
Member

fb55 commented Aug 9, 2024

@michaelfaith added

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants