All Questions

Tagged with
Filter by
Sorted by
Tagged with
110votes
10answers
164kviews

"React.Children.only expected to receive a single React element child" error when putting <Image> and <TouchableHighlight> in a <View>

I have the following render method in my React Native code: render() { const {height, width} = Dimensions.get('window'); return ( <View style={styles.container}> <Image ...
user avatar
  • 6,649
104votes
28answers
218kviews

npm install Error: rollbackFailedOptional

When I try npm install new packages it shows me this error: rollbackFailedOptional: verb npm-session 585aaecfe5f9a82 node --version 8.4.0 npm --version 5.3.0
user avatar
  • 1,041
72votes
1answer
20kviews

Authentication with React Native and API backend

I'm trying to wrap my head around oauth with a React Native app and a separate NodeJS/Express API backend. I understand https://github.com/adamjmcgrath/react-native-simple-auth offers authentication ...
user avatar
  • 5,516
71votes
18answers
47kviews

React Native on Android: Cannot run program "node": error=2, No such file or directory

EDIT: I am uncertain which steps I took to resolve this problem, and am no longer seeing this error message so I cannot test the solutions below. Please try them individually as different answers seem ...
user avatar
  • 746
55votes
38answers
148kviews

react-native run-android is unrecognized

I've installed react-native-cli globally: npm install -g react-native-cli Then run: react-native init AwesomeProject cd AwesomeProject I got the following structure: -- ...
user avatar
52votes
11answers
36kviews

React Native ios build : Can't find node

I have a prototype ready to go and the project is jammed with build: error: Can't find 'node' binary to build React Native bundle If you have non-standard nodejs installation, select your project ...
user avatar
  • 1,643
40votes
8answers
15kviews

ReferenceError: Can't find variable: __fbBatchedBridge

Using just the default code from react-native init AwesomeProject, when I run the app I get the 'ReferenceError: Can't find variable: __fbBatchedBridge (line 1 in the generated bundle)'. And, when I '...
user avatar
  • 7,502
39votes
4answers
61kviews

Cancel All Subscriptions and Asyncs in the componentWillUnmount Method, how?

I'm getting an error message due to an async method issue. In my terminal I'm seeing: Warning: Can't call setState (or forceUpdate) on an unmounted component. This is a no-op, but it indicates a ...
user avatar
  • 1,289
36votes
5answers
10kviews

Viable options for running NodeJS on Android (Aug 2017)

There are a bunch of old SO threads dealing with running NodeJS on Android. Most of these are no longer viable (JXCore) and/or provide confusing, outdated, incomplete, or erroneous information. ...
user avatar
33votes
8answers
18kviews

expo + react-native: There was a problem sending log messages

I am building a react-native app that I recently moved to expo. The app seems to display the expected screen, but before it completes, I am receiving the following error message: console.error: "...
user avatar
  • 2,151
32votes
8answers
36kviews

Is it possible to combine React Native with socket.io

I was working on an app with Phonegap + React.js and Socket.io. However, then React-Native got released and the native feel is amazing. I tried getting socket.io-client working with React Native, ...
user avatar
  • 2,592
32votes
9answers
27kviews

Cannot read properties of undefined (reading 'transformFile') at Bundler.transformFile

I have updated node today and I'm getting this error: error: TypeError: Cannot read properties of undefined (reading 'transformFile') at Bundler.transformFile (/Users/.../node_modules/metro/src/...
user avatar
31votes
12answers
74kviews

Axios (in React-native) not calling server in localhost

I'm building a really easy api and react-native application. The server works well (tested with PostMan) but the application doesn't call the server. It blocks when axios has to send the post request ...
user avatar
  • 1,890
27votes
8answers
49kviews

-bash: react-native: command not found

I have successfully installed brew, node 4.0+, watchman and flow, and I received the following when I do npm install -g react-native-cli: /Users/home/.node/bin/react-native -> /Users/home/.node/...
user avatar
25votes
19answers
52kviews

Cannot uninstall webpack from react-script

I was trying to make a todo-app in react, which is new to me. But after once installed webpack, npm start doesnt working. It gives me: my-todo-react@0.1.0 start /home/hanna/Desktop/projects/my-todo-...
user avatar

15 30 50 per page
1
2 3 4 5
186