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

[JS Client] Fix for build error in React Native #121

Conversation

kaxline
Copy link
Contributor

@kaxline kaxline commented Jul 2, 2021

There is an issue when adding streamr-client to a React Native project, where the build throws a warning:

warn Package streamr-client has been ignored because it contains invalid configuration. Reason: Package subpath './package.json' is not defined by "exports" in {ProjectRoot}/node_modules/streamr-client/package.json

Which is a problem with the react-native cli discussed a bit here:

react-native-community/cli#1168

I found a fix for it here, which seems like a light fix that could preempt a lot of confusion and FUD by new adopters adding streamr-client to React Native:

https://github.com/infctr/eslint-plugin-typescript-sort-keys/pull/28/files

This PR applies the changes to package.json "exports" that should resolve the error/warning.

Let me know what you think!

@CLAassistant
Copy link

CLAassistant commented Jul 2, 2021

CLA assistant check
All committers have signed the CLA.

@fonty1 fonty1 requested a review from timoxley July 2, 2021 14:38
@timoxley
Copy link
Contributor

timoxley commented Jul 5, 2021

Thanks for this. Note that package.json currently needs the dist in the path which will be rewritten by this script when publishing: https://github.com/streamr-dev/network-monorepo/blob/a336cc3db4f7beb71f1fc78a95aecac642111e4e/packages/client/copy-package.js#L8-L14

@kaxline
Copy link
Contributor Author

kaxline commented Jul 8, 2021

@timoxley Thanks for taking a look! Can you check my latest commit and see if that's what you had in mind?

@harbu harbu closed this Sep 6, 2022
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 this pull request may close these issues.

None yet

4 participants