Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cannot start ReactNativeProject

I followed the tutorial in the link here https://facebook.github.io/react-native/docs/getting-started.html#content . As it turns out, npm 5 is not supported yet. I tried installing npm 4 but, it is not working either. Stuck in the first page of the tutorial, when I run npm start, I am getting a bunch of errors too. Literally stuck, nowhere else to turn. Before voting down the question, kindly note that I am a mobile developer working with andorid and Ios having no previous knowledge about web technologies. Thanks

These are the steps I followed

npm install -g create-react-native-app

It was successfull, then,

create-react-native-app AwesomeProject

for this line, I got the following error

    *******************************************************************************
ERROR: npm 5 is not supported yet
*******************************************************************************

It looks like you're using npm 5 which was recently released.

Create React Native App doesn't work with npm 5 yet, unfortunately. We
recommend using npm 4 or yarn until some bugs are resolved.

You can follow the known issues with npm 5 at:
https://github.com/npm/npm/issues/16991

*******************************************************************************

Then I ran the command

cd AwesomeProject

Afterwards I ran

npm start

for which I got the error

    npm ERR! missing script: start

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/jayakrishnan/.npm/_logs/2017-07-25T08_13_06_277Z-debug.log

I tried using Yarn But didnt work

like image 285
mad_greasemonkey Avatar asked Jul 25 '17 06:07

mad_greasemonkey


2 Answers

npm i -g [email protected] - then install create-react-native-app again and create a project.

like image 129
Balasubramanian Avatar answered Sep 21 '22 18:09

Balasubramanian


Solution with Yarn:

First install Yarn

yarn global add create-react-native-app
cd AwesomeProject
yarn start
like image 38
SandroMarques Avatar answered Sep 22 '22 18:09

SandroMarques