react native app cannot fetch bundle - android

Although npm start or react-native start is running
app gives this error:
When I searched I tried npm install it gives this error:
How to fix this?
It seems like missing a dependency of the react native project.

The prompt show very clear,Unable to connect your device to the packager sever.
If your device and your computer under the same wi-fi,You can according to the last attempt to modify the connection attributes of your device.

install the dependency packages
npm install --force react#15.3.1
instead of
npm install react#15.3.1

Related

Specify configs in the ini-formatted file:

Noob here,
Im trying to run android emulator installed for my reactnative app to test on vscode online on azure linux machine and getting the follow error:
Specify configs in the ini-formatted file:
/home/vsonline/.npmrc
or on the command line via: npm <command> --key value
Config info can be viewed via: npm help config
when I run npm start-android-emulator I get the error.
Please any help. I am trying to run react-native code without installing android studio
you should use npx or yarn like this npx start-android-emulator or yarn start-android-emulator

React native build failed: The development server returned response error code 500

enter image description here
Browser's console Error:
Bundling index.android.js [development, non-minified, hmr disabled] 99.3% (1074/1078), failed.
Error: Uncaught error in the transformer worker: /home/manish/donut/node_modules/metro-bundler/src/transformer.js
at _transform.then.catch.error (/home/manish/donut/node_modules/metro-bundler/src/JSTransformer/index.js:172:31)
at process._tickCallback (internal/process/next_tick.js:109:7)
Make sure you have run the npm server. From your project root folder
Open terminal cd project root and run the following command
npm start
And if you are using command to compile and run the app on device or simulator, then make sure you have run the
react-native run-android or run-ios
command from different terminal, to make sure you have not closed terminal which you run npm start.
And see whether server started successfully
This can happen if import is not proper. Example if I try to import something like this below
import renderIf from './renderIf';
and there is renderIf file present in my project.
So all these types of issues will get printed in npm server logs. See the logs and fix it accordingly.

Start React Native command line interface

this is the first time I started to work on the React Native Android Application But I am facing problem while opening React Native command line interface and I don't know how to open it please any one help me regarding this or provide me a link from where I can able to make a demo app.
install node.js and then run:
npm install react-native-cli -g
This installs react-native-cli globally so you can open command line and run
react-native init AwesomeProject

Android React - Getting "Requiring unknown module react"

I keep getting this error when running the app on mobile android device, can anyone help.
The actual error:
Error: Requiring unknown module "react". If you are sure the module is there, try restarting the package or running "npm install". (index.android.bundle:93)
This is a pretty common error when developing React Native apps
Standing in the project root fgrep -rlo "React" . | grep -v "node_modules" will give you all places where "React" is being called
If this doesn't help you find your issue, there are lots of things you can try but you will have to provide more code
Hope this helps
Try deleting the node_modules folder and run npm install in command line at project root directory.
If it still fails, try to run npm install react --save

Installing Ionic via Node.js fails

I wanted to set up Ionic. So I downloaded and set up everything I needed to do so, but now if I want to download and install Ionic via Node.js with the command
npm install -g cordova ionic
I just get these errors, over and over again:
http://www.bilder-upload.eu/upload/f98eff-1432744817.png
http://www.bilder-upload.eu/upload/835599-1432744553.png
The installation of cordova seems to work since I can adress its commands already:
http://www.bilder-upload.eu/upload/e94db8-1432744749.png
So this works. But with Ionic I jsut receive the connection problems I wrote about here. Are there any suggestions why this happens?
Try after cleaning npm cache using this command npm cache clean

Categories

Resources