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

fix(package.json): add package.json to exports #77

Closed
wants to merge 1 commit into from

Conversation

tastydev
Copy link

If you are using bundlers like metro in rn-native (or tools that make use of metainformation of packages) you will recieve an import warning like:

warn Package pretty-bytes has been ignored because it contains invalid configuration. Reason: Package subpath './package.json' is not defined by "exports" in /Users/****/Applications/****/****/app/node_modules/pretty-bytes/package.json

There was a similar Issue in uuidjs, for discussion you can see this issue uuidjs/uuid#444 (comment)

If you are using bundlers like metro in rn-native (or tools that make use of metainformation of packages) you will recieve an import warning like:
```
warn Package pretty-bytes has been ignored because it contains invalid configuration. Reason: Package subpath './package.json' is not defined by "exports" in /Users/****/Applications/****/****/app/node_modules/pretty-bytes/package.json
```

There was a similar Issue in `uuidjs`, for discussion you can see this issue uuidjs/uuid#444 (comment)
@sindresorhus
Copy link
Owner

This is incorrect. There is no expectation that packages export package.json. The bundler needs to use a better way to load package.json files. Open an issue on your bundler instead.

Repository owner locked as resolved and limited conversation to collaborators Nov 30, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants