在项目中安装本机基础时出错

时间:2017-09-22 12:48:05

标签: react-native native-base

为我做好本地工作。

我用这个安装原生基地:

$ npm install -g native-base-cli

然后我用这个创建新项目:

$ react-native init T
$ cd T

然后在这个命令之后我有错误:

$ npm install native-base --save

npm WARN addRemoteGit Error: not found: git
npm WARN addRemoteGit     at getNotFoundError (C:\Program Files\nodejs\node_modules\npm\node_modules\which\which.js:14:12)
npm WARN addRemoteGit     at F (C:\Program Files\nodejs\node_modules\npm\node_modules\which\which.js:69:19)
npm WARN addRemoteGit     at E (C:\Program Files\nodejs\node_modules\npm\node_modules\which\which.js:81:29)
npm WARN addRemoteGit     at C:\Program Files\nodejs\node_modules\npm\node_modules\which\which.js:90:16
npm WARN addRemoteGit     at C:\Program Files\nodejs\node_modules\npm\node_modules\which\node_modules\isexe\index.js:44:5
npm WARN addRemoteGit     at C:\Program Files\nodejs\node_modules\npm\node_modules\which\node_modules\isexe\windows.js:29:5
npm WARN addRemoteGit     at C:\Program Files\nodejs\node_modules\npm\node_modules\graceful-fs\polyfills.js:264:29
npm WARN addRemoteGit     at FSReqWrap.oncomplete (fs.js:123:15)
npm WARN addRemoteGit  git+https://github.com/GeekyAnts/react-native-drawer.git resetting remote C:\Users\ibnkh\AppData\Roaming\npm-cache\_git-remotes\git-https-github-com-GeekyAnts-react-native-drawer-git-5dbe324d because of error: { Error: not found: git
npm WARN addRemoteGit     at getNotFoundError (C:\Program Files\nodejs\node_modules\npm\node_modules\which\which.js:14:12)
npm WARN addRemoteGit     at F (C:\Program Files\nodejs\node_modules\npm\node_modules\which\which.js:69:19)
npm WARN addRemoteGit     at E (C:\Program Files\nodejs\node_modules\npm\node_modules\which\which.js:81:29)
npm WARN addRemoteGit     at C:\Program Files\nodejs\node_modules\npm\node_modules\which\which.js:90:16
npm WARN addRemoteGit     at C:\Program Files\nodejs\node_modules\npm\node_modules\which\node_modules\isexe\index.js:44:5
npm WARN addRemoteGit     at C:\Program Files\nodejs\node_modules\npm\node_modules\which\node_modules\isexe\windows.js:29:5
npm WARN addRemoteGit     at C:\Program Files\nodejs\node_modules\npm\node_modules\graceful-fs\polyfills.js:264:29
npm WARN addRemoteGit     at FSReqWrap.oncomplete (fs.js:123:15) code: 'ENOGIT' }
npm WARN addRemoteGit Error: not found: git
npm WARN addRemoteGit     at getNotFoundError (C:\Program Files\nodejs\node_modules\npm\node_modules\which\which.js:14:12)
npm WARN addRemoteGit     at F (C:\Program Files\nodejs\node_modules\npm\node_modules\which\which.js:69:19)
npm WARN addRemoteGit     at E (C:\Program Files\nodejs\node_modules\npm\node_modules\which\which.js:81:29)
npm WARN addRemoteGit     at C:\Program Files\nodejs\node_modules\npm\node_modules\which\which.js:90:16
npm WARN addRemoteGit     at C:\Program Files\nodejs\node_modules\npm\node_modules\which\node_modules\isexe\index.js:44:5
npm WARN addRemoteGit     at C:\Program Files\nodejs\node_modules\npm\node_modules\which\node_modules\isexe\windows.js:29:5
npm WARN addRemoteGit     at C:\Program Files\nodejs\node_modules\npm\node_modules\graceful-fs\polyfills.js:264:29
npm WARN addRemoteGit     at FSReqWrap.oncomplete (fs.js:123:15)
npm WARN addRemoteGit  git+https://github.com/GeekyAnts/react-native-keyboard-aware-scroll-view.git resetting remote C:\Users\ibnkh\AppData\Roaming\npm-cache\_git-remotes\git-https-github-com-GeekyAnts-react-native-keyboard-aware-scroll-view-git-8603b9f3 because of error: { Error: not found: git
npm WARN addRemoteGit     at getNotFoundError (C:\Program Files\nodejs\node_modules\npm\node_modules\which\which.js:14:12)
npm WARN addRemoteGit     at F (C:\Program Files\nodejs\node_modules\npm\node_modules\which\which.js:69:19)
npm WARN addRemoteGit     at E (C:\Program Files\nodejs\node_modules\npm\node_modules\which\which.js:81:29)
npm WARN addRemoteGit     at C:\Program Files\nodejs\node_modules\npm\node_modules\which\which.js:90:16
npm WARN addRemoteGit     at C:\Program Files\nodejs\node_modules\npm\node_modules\which\node_modules\isexe\index.js:44:5
npm WARN addRemoteGit     at C:\Program Files\nodejs\node_modules\npm\node_modules\which\node_modules\isexe\windows.js:29:5
npm WARN addRemoteGit     at C:\Program Files\nodejs\node_modules\npm\node_modules\graceful-fs\polyfills.js:264:29
npm WARN addRemoteGit     at FSReqWrap.oncomplete (fs.js:123:15) code: 'ENOGIT' }
npm ERR! git clone --template=C:\Users\ibnkh\AppData\Roaming\npm-cache\_git-remotes\_templates --mirror https://github.com/GeekyAnts/react-native-drawer.git C:\Users\ibnkh\AppData\Roaming\npm-cache\_git-remotes\git-https-github-com-GeekyAnts-react-native-drawer-git-5dbe324d: undefined
npm ERR! git clone --template=C:\Users\ibnkh\AppData\Roaming\npm-cache\_git-remotes\_templates --mirror https://github.com/GeekyAnts/react-native-drawer.git C:\Users\ibnkh\AppData\Roaming\npm-cache\_git-remotes\git-https-github-com-GeekyAnts-react-native-drawer-git-5dbe324d: undefined
npm ERR! git clone --template=C:\Users\ibnkh\AppData\Roaming\npm-cache\_git-remotes\_templates --mirror https://github.com/GeekyAnts/react-native-keyboard-aware-scroll-view.git C:\Users\ibnkh\AppData\Roaming\npm-cache\_git-remotes\git-https-github-com-GeekyAnts-react-native-keyboard-aware-scroll-view-git-8603b9f3: undefined
npm ERR! git clone --template=C:\Users\ibnkh\AppData\Roaming\npm-cache\_git-remotes\_templates --mirror https://github.com/GeekyAnts/react-native-keyboard-aware-scroll-view.git C:\Users\ibnkh\AppData\Roaming\npm-cache\_git-remotes\git-https-github-com-GeekyAnts-react-native-keyboard-aware-scroll-view-git-8603b9f3: undefined
npm ERR! Windows_NT 10.0.15063
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "native-base" "--save"
npm ERR! node v6.11.2
npm ERR! npm  v3.10.10
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!     C:\Projects\T\npm-debug.log

我认为安装本机基础的问题。

我从这里开始的步骤:rustyline

1 个答案:

答案 0 :(得分:1)

您需要安装git作为本机需要安装的反应