在项目中安装本机基础时出错
error on install native base in project
React Native 对我来说很好用。
我用这个安装本机基础:
$ 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
我认为是安装 native base 的问题。
你需要安装 git 因为 React Native 需要安装它
React Native 对我来说很好用。
我用这个安装本机基础:
$ 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
我认为是安装 native base 的问题。
你需要安装 git 因为 React Native 需要安装它