Questions tagged [react-native-cli]

230 questions
320
votes
64 answers

Unable to load script.Make sure you are either running a Metro server or that your bundle 'index.android.bundle' is packaged correctly for release

react-native run-android command terminates by leaving a message in android simulator. The message is as follows: Unable to load script.Make sure you are either running a Metro server or that your bundle 'index.android.bundle' is packaged correctly…
Belle Solutions
  • 3,231
  • 2
  • 7
  • 4
176
votes
23 answers

How to resolve the error on 'react-native start'

I just installed node.js & cli installed node.js installed react-native-cli npm -g react-native-cli And created a 'new project'. react-native init new_project and inside that 'new_project' directory, I tired to see if metro bundler works…
Song Kevin
  • 1,761
  • 2
  • 7
  • 3
71
votes
19 answers

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/Bundler.js:48:30) at runMicrotasks…
Chaudhry Talha
  • 7,231
  • 11
  • 67
  • 116
68
votes
0 answers

What is the difference between Expo CLI and React Native CLI?

React Native provides two way to create Project. First: npm install -g expo-cli Second: npm install -g react-native-cli so what is different between them and what should be used if we create react native app?
Jitendra Suthar
  • 2,111
  • 2
  • 16
  • 22
49
votes
6 answers

Run a React Native iOS release build from terminal

I am trying to run the release build directly from the terminal and I did not found an option to do that. From XCode what is required to do is: Product -> Scheme -> Edit Scheme (cmd + <), make sure you're in the Run tab from the side, and set…
Sandro Machado
  • 9,921
  • 4
  • 36
  • 57
40
votes
8 answers

Error: `fsevents` unavailable (this watcher can only be used on Darwin)

I'm cloning an existing react native app in my local environment, but every time I run react-native run-ios I get the following error: ** BUILD FAILED ** The following commands produced analyzer issues: Analyze…
Aly Dabbous
  • 567
  • 1
  • 6
  • 14
26
votes
10 answers

react-native start giving Invalid regular expression invalid error

I followed following link to get started with react-native Getting started with react native I tried to create native app without expo so i as per documentation i followed following command npm install -g react-native-cli react-native init…
user4241989
23
votes
2 answers

How to run react-native run-ios with specific target

Is there a way to run a specific target with command react-native run-ios for Android I'm using following react-native run-android --variant=targetRelease
Dima Portenko
  • 3,443
  • 5
  • 35
  • 48
22
votes
12 answers

How to Get SHA-1 key in React Native cli?

In React Native when I'm trying to get Google GPS API key in Google console, I have seen package name and SHA-1 key where to I get SHA-1 key in React Native How to get SHA-1 key in React Native cli? (not in Expo).
Balaji
  • 9,657
  • 5
  • 47
  • 47
15
votes
5 answers

Since upgrading to Xcode 10.2 I can no longer run react-native run-ios through the cli

I upgraded to Xcode 10.2 today, since upgrading I can't run react-native run-ios through the cli: react-native run-ios --simulator="iPhone X" Found Xcode workspace a.xcworkspace Could not find iPhone X simulator Error: Could not find iPhone X…
smj2393
  • 1,929
  • 1
  • 23
  • 50
11
votes
6 answers

Why react-native-cli giving errors?

I recently installed react native cli globally. When i tried to start a project using react-native init projectname or npx react-native init projectname it started downloading packages and creating the project. After completion it gave this error …
aslamjm
  • 121
  • 1
  • 1
  • 5
10
votes
6 answers

Deprecated Gradle features were used in this build, making it incompatible with Gradle 6

I try to get Apk in react-native however it doesn't give me anything. release file which is in Apk file is empty and after Gradlew bundle release is finished, it says Deprecated Gradle features were used in this build, making it incompatible…
10
votes
1 answer

How to upgrade core-js@3 in react-native cli?

I am trying to create new project with react-native cli, but when I create a new project I am receiving the following error message: react-native > create-react-class > fbjs > core-js@1.2.7: core-js@<2.6.8 is no longer maintained. Please, upgrade…
M.D Luffy
  • 113
  • 1
  • 1
  • 5
7
votes
1 answer

React-Native change default location of iOS and Android folder

According to the react-native cli documentation we can specify custom configuration based on each platform for RN cli. I want to change the default location of each platform folders so I added my custom react-native.config.js to the root of the…
Hamid
  • 1,948
  • 4
  • 25
  • 38
7
votes
2 answers

How to watch react-native node_modules changes

When I run react-native start or npm start the packager starts and prompts to be Looking for JS files in /Users/map/repos/myrepo/ I've got Hot reloading enabled. When I change a file located within /Users/map/repos/myrepo/node_modules/react-native/…
maraujop
  • 4,472
  • 2
  • 36
  • 40
1
2 3
15 16