Skip to main content

All Questions

Tagged with
Filter by
Sorted by
Tagged with
169 votes
32 answers
179k views

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 ...
Steve C's user avatar
  • 1,746
138 votes
10 answers
238k views

"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 ...
Pedram's user avatar
  • 7,759
118 votes
22 answers
107k views

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 ...
Seeliang's user avatar
  • 2,771
110 votes
32 answers
255k views

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
Bipul Prasai's user avatar
  • 1,101
86 votes
24 answers
134k views

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/...
Chaudhry Talha's user avatar
78 votes
38 answers
223k views

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: -- ...
Sergey Onishchenko's user avatar
76 votes
2 answers
22k views

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 ...
wwwuser's user avatar
  • 6,332
50 votes
9 answers
37k views

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: "...
user1790300's user avatar
  • 1,785
44 votes
4 answers
69k views

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 ...
Dres's user avatar
  • 1,489
40 votes
13 answers
109k views

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 ...
Pibo's user avatar
  • 2,461
40 votes
8 answers
16k views

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 '...
Anonsage's user avatar
  • 8,230
39 votes
9 answers
88k views

Detect swipe left in React Native

How can I detect a left swipe on the entire screen in React Native? Would it be necessary to use PanResponder or can it be done a little more easy?
Jamgreen's user avatar
  • 10.9k
39 votes
5 answers
12k views

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. ...
Arnold Schrijver's user avatar
35 votes
11 answers
119k views

ENOENT: no such file or directory when running npm install command

When I run npm install, I getting the following error, npm WARN tar ENOENT: no such file or directory, open 'D:\Live Project\insyte-mobile\insyte-mobile\node_modules.staging\core-js-c9f4d03d\library\...
Rakesh kushwaha's user avatar
34 votes
1 answer
45k views

what is the use of watchman for react native?

Can anybody describe clearly what the use of watchman available in npm library? ----Details I found--- npm - npm is the largest NodeJS package manager NodeJS - Server-side Javascript runtime ...
Lakshitha Kanchana's user avatar
33 votes
9 answers
44k views

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, ...
Timon's user avatar
  • 2,702
32 votes
4 answers
55k views

How to build expo apk using eas build

After updating expo it no longer supports building apk files using expo build:android -t apk and instead advices to using eas builds using the command eas build -p android --profile preview but it ...
coolDog's user avatar
  • 556
31 votes
5 answers
60k views

Can't find variable: Buffer

I'm trying to use node modules in my react-native app, and I'm taking the ReactNativify approach here. I'm all set up now, and I got the crypto package to load in fine. However when I added in eth-...
arshbot's user avatar
  • 15k
29 votes
9 answers
28k views

spawn yarnpkg ENOENT

This happens when I run expo install expo-permissions It explicitly returns me Installing 1 SDK 35.0.0 compatible native module using Yarn. yarn add expo-permissions@~7.0.0 spawn yarnpkg ENOENT Set ...
Wilfredo Casas's user avatar
29 votes
8 answers
83k views

Proper mechanism to downgrade react-native

My situation is this : I had a working copy of a react-native project that was working well. Had it commited to my git repository. I decided to upgrade react-native to 0.26.3 and then 0.28 and ...
Sathyakumar Seshachalam's user avatar
29 votes
6 answers
22k views

xcode using wrong node.js version

I am new to React Native. I used react-native init XXX to create a new project. When launch the xcodeproj, I got an error saying: const setupEnvScript = /^win/.test(process.platform) ^^^^^ ...
Allan Jiang's user avatar
  • 11.3k
29 votes
5 answers
45k views

React Native: process.env has only NODE_ENV

I'm setting an environment variable while building my react-native app (on windows): SET APP_ENV=dev & react-native run-android echo %APP_ENV% returns 'dev' But when I log process.env object in ...
Supreet Totagi's user avatar
28 votes
14 answers
65k views

Error: Unable to determine the current character, it is not a string, number, array, or object in react-native for android

Whenever I run react-native run-android while keeping the emulator running, I get this error. react-native run-ios wroks completely fine. Error: Command failed: ./gradlew app:installDebug -...
yashatreya's user avatar
28 votes
9 answers
36k views

CocoaPods could not find compatible versions for pod "lottie-ios"

i can't install react-native-lottie throwing error compatatible version for lottie-react-native CocoaPods could not find compatible versions for pod "lottie-ios"
Ruban Dharmaraj's user avatar
27 votes
20 answers
74k views

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: [email protected] start /home/hanna/Desktop/projects/my-todo-...
Hanna Kogut's user avatar
27 votes
8 answers
55k views

-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/...
loungeonbench's user avatar
26 votes
8 answers
20k views

React-Native project stuck on :app:installDebug

Every time I run my react-native project it's stuck in 99%. I've tried to run ./Gradlew clean and kill adb but nothing works. I already used my device via usb, genymotion and android studio emulator ...
Alessandro Macanha's user avatar
25 votes
4 answers
29k views

fetch API always returns {"_U": 0, "_V": 0, "_W": null, "_X": null}

The below code always return the below wired object {"_U": 0, "_V": 0, "_W": null, "_X": null} as response. Here is my code getData = () => { ...
Kavinkumar . N's user avatar
24 votes
5 answers
77k views

What does '&&' operator indicate with { this.props.children && React.cloneElement(this.props.children, { foo:this.foo})

I have react class that is rendered using react router. I understand that React.cloneElement is used to pass elements from parent to child. But why/what does the '&&' operator do with this ...
Arathi Arumugam's user avatar
24 votes
4 answers
22k views

Where is Yarn storing offline packages?

I'm trying to install all the dependencies for this repo: https://github.com/react-community/react-navigation The problem is that Yarn seems to have stored offline packages somewhere other than the ...
rraallvv's user avatar
  • 2,915
24 votes
3 answers
21k views

Pass an object with JS throw new Error in node

I want to throw an error in my node application as follows. throw new Error({ status: 400, error: 'Email already exists' }); this give me the following output. Error: [object Object] I can't ...
Shashika Virajh's user avatar
20 votes
2 answers
13k views

Can I use reactJS library in react-native?

Well, this might be a silly question but I want to clarify the reason. React-Native imports nodeJS libraries, so I think it is possible to use reactJS library as well though reactJS includes pure html ...
Smart Solutions's user avatar
19 votes
2 answers
5k views

How do I read NPM dependency-conflict errors?

I'm trying to run npm install on a fairly outdated project and keep running into NPM dependency errors. I've ran into hundreds of errors like these before in various projects, but I have yet to find a ...
Eric Hasegawa's user avatar
19 votes
4 answers
12k views

React native and socket.io node not working

Below is my react native component and node server.js code that I am trying to connect to my node websocket backend. My react code is running on the same computer as the server. I have found so many ...
peter flanagan's user avatar
17 votes
5 answers
34k views

Process 'command 'node'' finished with non-zero exit value 1

I tried to build jitsi meet based on react-native but it stucks in bundleReleaseJsAnd assets and then throw this error : Process 'command 'node'' finished with non-zero exit value 1
ali mardani's user avatar
16 votes
8 answers
29k views

Getting 'TypeError: interpolate is not a function' in React-Native

I am learning react-native currently. I'm on this Project that uses mainly - react-navgation,FlatList and react-native-magnus for UI. It takes in an Array of Objects, and uses FlatList to return a ...
Arushi Singh's user avatar
16 votes
6 answers
51k views

yarn install throw error request failed \"404 Not found"

I have react native project that I worked on my laptop. when I transfer the project to my pc and run yarn install (I installed the some modules using yarn and some using npm) I get An unexpected ...
Manspof's user avatar
  • 227
16 votes
17 answers
30k views

React native : Failed to construct transformer: Error: Cannot create a string longer than 0x1fffffe8 characters

package.json { "name": "project", "version": "0.0.1", "private": true, "scripts": { "android": "react-native run-...
Mitesh K's user avatar
  • 742
16 votes
2 answers
15k views

React Native: fetch request failed with error - TypeError: Network request failed(…)

I am developing a simple app using React Native. I am testing it on Android device. I have created a Node.js server to listen to the requests, it is running at http://localhost:3333/. Next, I am ...
C.P.'s user avatar
  • 1,212
16 votes
5 answers
14k views

react-native to use absolute paths? instead of doing import X from '../../something/X'?

I'm wondering the best way for me to use a full path for my project. For example, if I am importing a component, I don't want to do import Component from '../components/Component', rather just do ...
user3152131's user avatar
16 votes
1 answer
2k views

How get notifications from stack overflow for new questions?

I would like to answer to new javascript, react, react-native and node questions. So, how would I know about the new questions which are asked by users on these areas?
Shashika Virajh's user avatar
16 votes
4 answers
10k views

React-Native Packager Failure: Duplicate module name

This happened seemingly randomly during development. When trying to run npm start or react-native run-ios, I get the following error: Failed to build DependencyGraph: @providesModule naming collision:...
chandlervdw's user avatar
  • 3,226
15 votes
7 answers
21k views

`Firebase` package was successfully found. However, this package itself specifies a `main` module field that could not be resolved

I'm trying to read and write to firestore, use firebase's authentication, and firebase's storage within a expo managed react-native application. Full Error: While trying to resolve module `firebase` ...
Joshua Gao's user avatar
15 votes
6 answers
3k views

Property body[41] of BlockStatement expected node to be of a type ["Statement"] but instead got "AssignmentExpression"

My react native project worked fine yesterday. But this morning, after I tried to run it again, it gave me the following error: error node_modules/react-native/Libraries/Components/ScrollView/...
Punreach Rany's user avatar
15 votes
7 answers
47k views

The legacy expo-cli does not support Node +17

I have installed expo-cli and set the env variable. It gives this error: The legacy expo-cli does not support Node +17. Migrate to the versioned Expo CLI (npx expo). Uncaught Error Error: EPERM: ...
Anosha Sheikh's user avatar
15 votes
6 answers
10k views

Error while running react application

Error: Cannot find module 'webpack/schemas/WebpackOptions.json' My webpack.config.js looks like this - var config = { entry: './main.js', output: { path: '/', filename: 'index.js', }, ...
Bharat Bittu's user avatar
15 votes
2 answers
1k views

React native deploying on iOS device stuck on Running 1 of 1 custom shell script

I'm trying to run a React Native application on iOS device. It works fine on simulator, but while running on device it takes long 20-25 minutes to run. I get stuck on Running 1 of 1 custom shell ...
Abhinandan Sahgal's user avatar
14 votes
7 answers
11k views

npm install -g expo-cli fails with "EPERM: operation not permitted, unlink '...\adb.exe'

I receive an error when running $ npm install -g expo-cli I have tried reinstalling the node modules as An Administrator but the same error occurs. Environment: Windows 10, Node Version: 10.15.3, ...
Griseld Gerveni's user avatar
14 votes
3 answers
8k views

React Native - Automatic version name from package.json to android build manifest

Currently I have a react native app and the issue that I have is that is very time consuming to update the version on every build or commit. Also, I have Sentry enabled so every time I build, some ...
sebastianf182's user avatar
14 votes
7 answers
11k views

React Native starter project bundling fails with Unexpected Token error

I'm trying to create my first React Native app for Android using the instructions on https://facebook.github.io/react-native/docs/getting-started.html. After setting up the dependencies and connecting ...
ahnafisenough's user avatar

1
2 3 4 5
67