I followed the React native official docs step by step, but as soon as I executed the command react-native init MedFirstRN
from windows cmd, I received the following error:
D:\projects>react-native init MedFirstRN
This will walk you through creating a new React Native project in D:\projects\MedFirstRN
Installing react-native package from npm...
npm WARN addRemoteGit Error: not found: git
npm WARN addRemoteGit at F (C:\android\nodejs\node_modules\npm\node_modules\which\which.js:73:28)
npm WARN addRemoteGit at E (C:\android\nodejs\node_modules\npm\node_modules\which\which.js:76:29)
npm WARN addRemoteGit at C:\android\nodejs\node_modules\npm\node_modules\which\which.js:84:16
npm WARN addRemoteGit at FSReqWrap.oncomplete (fs.js:82:15)
npm WARN addRemoteGit git://github.com/facebook/react.git#b4e74e38e43ac53af8acd62c78c9213be0194245 resetting remote C:\Users\Moughaoui\AppData\Roaming\npm-cache\_git-r
emotes\git-github-com-facebook-react-git-b4e74e38e43ac53af8acd62c78c9213be0194245-c92d21d2e268ee43029cdd9b3cd02392 because of error: { [Error: not found: git] code: 'EN
OGIT' }
npm ERR! git clone --template=C:\Users\Moughaoui\AppData\Roaming\npm-cache\_git-remotes\_templates --mirror git://github.com/facebook/react.git C:\Users\Moughaoui\AppDa
ta\Roaming\npm-cache\_git-remotes\git-github-com-facebook-react-git-b4e74e38e43ac53af8acd62c78c9213be0194245-c92d21d2e268ee43029cdd9b3cd02392: undefined
npm ERR! git clone --template=C:\Users\Moughaoui\AppData\Roaming\npm-cache\_git-remotes\_templates --mirror git://github.com/facebook/react.git C:\Users\Moughaoui\AppDa
ta\Roaming\npm-cache\_git-remotes\git-github-com-facebook-react-git-b4e74e38e43ac53af8acd62c78c9213be0194245-c92d21d2e268ee43029cdd9b3cd02392: undefined
npm ERR! Windows_NT 6.1.7601
npm ERR! argv "C:\\android\\nodejs\\node.exe" "C:\\android\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "--save" "react-native"
npm ERR! node v5.0.0
npm ERR! npm v3.3.6
npm ERR! code ENOGIT
npm ERR! not found: git
npm ERR!
npm ERR! Failed using git.
npm ERR! This is most likely not a problem with npm itself.
npm ERR! Please check if you have git installed and in your PATH.
npm ERR! Please include the following file with any support request:
npm ERR! D:\projects\MedFirstRN\npm-debug.log
`npm install --save react-native` failed
D:\projects>
Can you help please?
When I execute this command from Git Shell it works.