2
votes

just followed the instructions on facebook.github for create-react-native-app first got: react-redux 5.0.6 requires a peer of react@^0.14.0 || react@^15.0.0-0 .... then I uninstalled react-redux now getting this...

here is package.json

ERROR STARTING PACKAGER

Error: React native is not installed. Please run npm install in your project directory. 1:23:51 AM: Error starting packager: Error: Couldn't start project. Please fix t he errors and restart the project. at E:\xdl\src\Project.js:1126:11 at next (native) at step (E:\react-native\hello-world\node_modules\xdl\build\Project.js:1504: 191) at E:\react-native\hello-world\node_modules\xdl\build\Project.js:1504:361 npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! [email protected] start: react-native-scripts start npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the [email protected] start script. npm ERR! This is probably not a problem with npm. There is likely additional log ging output above.

npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\Jawad Ul Hassan\AppData\Roaming\npm-cache_logs\2017-09-08 T20_23_51_654Z-debug.log

what could be my mistake or any suggestion about doing it right way ?

after npm install getting this

npm WARN addRemoteGit Error: not found: git
npm WARN addRemoteGit     at getNotFoundError (C:\Users\Jawad Ul Hassan\AppData\
Roaming\npm\node_modules\npm\node_modules\which\which.js:13:12)
npm WARN addRemoteGit     at F (C:\Users\Jawad Ul Hassan\AppData\Roaming\npm\node_modules\npm\node_modules\which\which.js:68:19)
npm WARN addRemoteGit at E (C:\Users\Jawad Ul Hassan\AppData\Roaming\npm\nod
e_modules\npm\node_modules\which\which.js:80:29)
npm WARN addRemoteGit     at C:\Users\Jawad Ul Hassan\AppData\Roaming\npm\node_m
odules\npm\node_modules\which\which.js:89:16
npm WARN addRemoteGit     at C:\Users\Jawad Ul Hassan\AppData\Roaming\npm\node_m
odules\npm\node_modules\which\node_modules\isexe\index.js:42:5
npm WARN addRemoteGit     at C:\Users\Jawad Ul Hassan\AppData\Roaming\npm\node_m
odules\npm\node_modules\which\node_modules\isexe\windows.js:36:5
npm WARN addRemoteGit     at C:\Users\Jawad Ul Hassan\AppData\Roaming\npm\node_m
odules\npm\node_modules\graceful-fs\polyfills.js:284:29
npm WARN addRemoteGit     at FSReqWrap.oncomplete (fs.js:123:15)
npm WARN addRemoteGit  expo/node-websql#18.0.0 resetting remote C:\Users\Jawad U
l Hassan\AppData\Roaming\npm-cache\_git-remotes\git-github-com-expo-node-websql-
git-18-0-0-8213877d because of error: { Error: not found: git
npm WARN addRemoteGit     at getNotFoundError (C:\Users\Jawad Ul Hassan\AppData\
Roaming\npm\node_modules\npm\node_modules\which\which.js:13:12)
npm WARN addRemoteGit     at F (C:\Users\Jawad Ul Hassan\AppData\Roaming\npm\nod
e_modules\npm\node_modules\which\which.js:68:19)
npm WARN addRemoteGit     at E (C:\Users\Jawad Ul Hassan\AppData\Roaming\npm\nod
e_modules\npm\node_modules\which\which.js:80:29)
npm WARN addRemoteGit     at C:\Users\Jawad Ul Hassan\AppData\Roaming\npm\node_m
odules\npm\node_modules\which\which.js:89:16
npm WARN addRemoteGit     at C:\Users\Jawad Ul Hassan\AppData\Roaming\npm\node_m
odules\npm\node_modules\which\node_modules\isexe\index.js:42:5
npm WARN addRemoteGit     at C:\Users\Jawad Ul Hassan\AppData\Roaming\npm\node_m
odules\npm\node_modules\which\node_modules\isexe\windows.js:36:5
npm WARN addRemoteGit     at C:\Users\Jawad Ul Hassan\AppData\Roaming\npm\node_m
odules\npm\node_modules\graceful-fs\polyfills.js:284:29
npm WARN addRemoteGit     at FSReqWrap.oncomplete (fs.js:123:15) code: 'ENOGIT'
}
npm ERR! git clone --template=C:\Users\Jawad Ul Hassan\AppData\Roaming\npm-cache
\_git-remotes\_templates --mirror [email protected]:expo/node-websql.git C:\Users\J
awad Ul Hassan\AppData\Roaming\npm-cache\_git-remotes\git-github-com-expo-node-w
ebsql-git-18-0-0-8213877d: undefined
npm ERR! git clone --template=C:\Users\Jawad Ul Hassan\AppData\Roaming\npm-cache
\_git-remotes\_templates --mirror [email protected]:expo/node-websql.git C:\Users\J
awad Ul Hassan\AppData\Roaming\npm-cache\_git-remotes\git-github-com-expo-node-w
ebsql-git-18-0-0-8213877d: undefined
3
Try running npm installin your directory, if this doesn't solve, then edit your message adding your package.json file. Hope it helps - soutot
after npm install - Jawad
Try to install git... And then redo your npm install. - zer0chain

3 Answers

4
votes

When I Installed the react-navigation package that error occurred for me. I've fixed my issue

  1. Delete node_modules, package-lock.json
  2. run "yarn install".
  3. run "npm start".
2
votes

This is might be because of npm version v5 so

npm 5 is still very buggy, please either use yarn or npm version 4.

npm i -g yarn
npm i -g npm@4

OR make sure you do npm install from your project directory. This is also one of the reason why you get this error

npm i
0
votes

You can see on the first line that git is not found

==> npm WARN addRemoteGit Error: not found: git

install git first.