question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Not working with React Native

See original GitHub issue

Thanks for react-with-styles! It’s working well with Aphrodite so far, but I can’t get it to work in an existing or new React Native (0.33) project. The first problem I run into is having to install babel-preset-airbnb due to this error:

TransformError: /Users/lespozdena/Desktop/AwesomeProject/node_modules/react-with-styles-interface-react-native/lib/reactNativeInterface.js: Couldn't find preset "airbnb" relative to directory "/Users/lespozdena/Desktop/AwesomeProject/node_modules/react-with-styles-interface-react-native"

Clearing that dep lets the app run, but then react-with-styles does not ever deliver the styles prop (either via the default one or a custom-named one). The prop is always undefined. I never had this issue with React/Aphrodite.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:6

github_iconTop GitHub Comments

2reactions
lelandrichardsoncommented, Sep 21, 2016

@pozdena what we do (with great sadness) is run the following command as an npm postinstall script:

(find node_modules -type f -name .babelrc | grep -v /react-native/ | xargs rm) || true
0reactions
pozdenacommented, Nov 11, 2016

Revisiting this, the workaround @lelandrichardson originally suggested now works! Unfortunately, I’m not sure what changed on our end.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Troubleshooting - React Native
These are some common issues you may run into while setting up React Native. If you encounter something that is not listed here,...
Read more >
my app js not working in react native. what my mistake?
I newbie for react native. when I learning to hello world in app.js. when I run for android "native-react run-android" build success but...
Read more >
5 Most Common React Native Issues That Starters Face
Below Are Some React Native Issues that starters face · 1. App Registry Error in React Native: · 2. Development Server Error in...
Read more >
Troubleshooting | React Navigation
Troubleshooting. This section attempts to outline issues that users frequently encounter when first getting accustomed to using React Navigation.
Read more >
Troubleshooting for React Native | Sentry Documentation
Troubleshoot and resolve common issues with the React Native SDK.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found