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

Update build.gradle to support RNv56 #85

Merged
merged 1 commit into from
Aug 15, 2018

Conversation

abartolo
Copy link
Contributor

This PR is to support React Native v56. As discussed in #83 I have tested this change and now I am pointing to my fork in order to successfully build my project. From my tests snackbar has been working as intended throughout the entire app.

@abartolo
Copy link
Contributor Author

@cooperka I tested these changed on react-native-snackbar v0.4.4 and it worked. However, testing on v0.4.7 I am seeing an issue with the following line in the package.json https://github.com/abartolo/react-native-snackbar/blob/265b8a61e23e0510a9aa0d4396370c1c5533bc8f/package.json#L5

Issue
"main": "lib/index.js",

Error on npm start

Loading dependency graph, done.
error: bundling failed: Error: While trying to resolve module `react-native-snackbar` from file `/Users/abc/efg/hij/jlmn/app/src/screens/AppInitializationScreen/AppInitializationScreen.js`, the package `/Users/abc/efg/hij/jlmn/app/node_modules/react-native-snackbar/package.json` was successfully found. However, this package itself specifies a `main` module field that could not be resolved (`/Users/abc/efg/hij/jlmn/app/node_modules/react-native-snackbar/lib/index.js`. Indeed, none of these files exist:

Fix
"main": "src/index.js",

Adding that fix my build did not fail.

Can you confirm that "lib/index.js" is an issue or there is something I am missing on my side?

@cooperka
Copy link
Owner

Thank you @abartolo! Looks like a robust fix. I'll merge this and test a few more things before release. lib/index.js is generated by the build script, so it won't exist unless you yarn run build first.

@cooperka cooperka merged commit 7a52900 into cooperka:master Aug 15, 2018
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.

2 participants