2017-07-17 38 views
0

我試圖建立反應本地項目,但我得到這個錯誤怎麼解決這個混帳克隆erron反應本土如何解決這個

npm WARN [email protected] requires a peer of [email protected]^0.14.0 || ^15.0.0-0 || ^16.0.0-0 but none was installed. 
Installing dependencies using npm... 

npm WARN addRemoteGit Error: not found: git 
npm WARN addRemoteGit  at getNotFoundError (C:\Users\VA\AppData\Roaming\npm\node_modules\npm\node_modules\which\which.js:13:12) 
npm WARN addRemoteGit  at F (C:\Users\VA\AppData\Roaming\npm\node_modules\npm\node_modules\which\which.js:68:19) 
npm WARN addRemoteGit  at E (C:\Users\VA\AppData\Roaming\npm\node_modules\npm\node_modules\which\which.js:80:29) 
npm WARN addRemoteGit  at C:\Users\VA\AppData\Roaming\npm\node_modules\npm\node_modules\which\which.js:89:16 
npm WARN addRemoteGit  at C:\Users\VA\AppData\Roaming\npm\node_modules\npm\node_modules\which\node_modules\isexe\index.js:42:5 
npm WARN addRemoteGit  at C:\Users\VA\AppData\Roaming\npm\node_modules\npm\node_modules\which\node_modules\isexe\windows.js:36:5 
npm WARN addRemoteGit  at C:\Users\VA\AppData\Roaming\npm\node_modules\npm\node_modules\graceful-fs\polyfills.js:284:29 
npm WARN addRemoteGit  at FSReqWrap.oncomplete (fs.js:152:21) 
npm WARN addRemoteGit expo/node-websql#18.0.0 resetting remote C:\Users\VA\AppData\Roaming\npm-cache\_git-remotes\git-github-com-expo-node-websql-git-18-0-0-17a6eb60 because of error: { Error: not found: git 
npm WARN addRemoteGit  at getNotFoundError (C:\Users\VA\AppData\Roaming\npm\node_modules\npm\node_modules\which\which.js:13:12) 
npm WARN addRemoteGit  at F (C:\Users\VA\AppData\Roaming\npm\node_modules\npm\node_modules\which\which.js:68:19) 
npm WARN addRemoteGit  at E (C:\Users\VA\AppData\Roaming\npm\node_modules\npm\node_modules\which\which.js:80:29) 
npm WARN addRemoteGit  at C:\Users\VA\AppData\Roaming\npm\node_modules\npm\node_modules\which\which.js:89:16 
npm WARN addRemoteGit  at C:\Users\VA\AppData\Roaming\npm\node_modules\npm\node_modules\which\node_modules\isexe\index.js:42:5 
npm WARN addRemoteGit  at C:\Users\VA\AppData\Roaming\npm\node_modules\npm\node_modules\which\node_modules\isexe\windows.js:36:5 
npm WARN addRemoteGit  at C:\Users\VA\AppData\Roaming\npm\node_modules\npm\node_modules\graceful-fs\polyfills.js:284:29 
npm WARN addRemoteGit  at FSReqWrap.oncomplete (fs.js:152:21) code: 'ENOGIT' } 
npm ERR! git clone --template=C:\Users\VA\AppData\Roaming\npm-cache\_git-remotes\_templates --mirror git://github.com/expo/node-websql.git C:\Users\VA\AppData\Roaming\npm-cache\_git-remotes\git-github-com-expo-node-websql-git-18-0-0-17a6eb60: undefined 
npm ERR! git clone --template=C:\Users\VA\AppData\Roaming\npm-cache\_git-remotes\_templates --mirror git://github.com/expo/node-websql.git C:\Users\VA\AppData\Roaming\npm-cache\_git-remotes\git-github-com-expo-node-websql-git-18-0-0-17a6eb60: undefined 
npm WARN addRemoteGit Error: not found: git 
npm WARN addRemoteGit  at getNotFoundError (C:\Users\VA\AppData\Roaming\npm\node_modules\npm\node_modules\which\which.js:13:12) 
npm WARN addRemoteGit  at F (C:\Users\VA\AppData\Roaming\npm\node_modules\npm\node_modules\which\which.js:68:19) 
npm WARN addRemoteGit  at E (C:\Users\VA\AppData\Roaming\npm\node_modules\npm\node_modules\which\which.js:80:29) 
npm WARN addRemoteGit  at C:\Users\VA\AppData\Roaming\npm\node_modules\npm\node_modules\which\which.js:89:16 
npm WARN addRemoteGit  at C:\Users\VA\AppData\Roaming\npm\node_modules\npm\node_modules\which\node_modules\isexe\index.js:42:5 
npm WARN addRemoteGit  at C:\Users\VA\AppData\Roaming\npm\node_modules\npm\node_modules\which\node_modules\isexe\windows.js:36:5 
npm WARN addRemoteGit  at C:\Users\VA\AppData\Roaming\npm\node_modules\npm\node_modules\graceful-fs\polyfills.js:284:29 
npm WARN addRemoteGit  at FSReqWrap.oncomplete (fs.js:152:21) 
npm WARN addRemoteGit expo/node-websql#18.0.0 resetting remote C:\Users\VA\AppData\Roaming\npm-cache\_git-remotes\git-https-github-com-expo-node-websql-git-18-0-0-9423671b because of error: { Error: not found: git 
npm WARN addRemoteGit  at getNotFoundError (C:\Users\VA\AppData\Roaming\npm\node_modules\npm\node_modules\which\which.js:13:12) 
npm WARN addRemoteGit  at F (C:\Users\VA\AppData\Roaming\npm\node_modules\npm\node_modules\which\which.js:68:19) 
npm WARN addRemoteGit  at E (C:\Users\VA\AppData\Roaming\npm\node_modules\npm\node_modules\which\which.js:80:29) 
npm WARN addRemoteGit  at C:\Users\VA\AppData\Roaming\npm\node_modules\npm\node_modules\which\which.js:89:16 
npm WARN addRemoteGit  at C:\Users\VA\AppData\Roaming\npm\node_modules\npm\node_modules\which\node_modules\isexe\index.js:42:5 
npm WARN addRemoteGit  at C:\Users\VA\AppData\Roaming\npm\node_modules\npm\node_modules\which\node_modules\isexe\windows.js:36:5 
npm WARN addRemoteGit  at C:\Users\VA\AppData\Roaming\npm\node_modules\npm\node_modules\graceful-fs\polyfills.js:284:29 
npm WARN addRemoteGit  at FSReqWrap.oncomplete (fs.js:152:21) code: 'ENOGIT' } 
npm ERR! git clone --template=C:\Users\VA\AppData\Roaming\npm-cache\_git-remotes\_templates --mirror https://github.com/expo/node-websql.git C:\Users\VA\AppData\Roaming\npm-cache\_git-remotes\git-https-github-com-expo-node-websql-git-18-0-0-9423671b: undefined 
npm ERR! git clone --template=C:\Users\VA\AppData\Roaming\npm-cache\_git-remotes\_templates --mirror https://github.com/expo/node-websql.git C:\Users\VA\AppData\Roaming\npm-cache\_git-remotes\git-https-github-com-expo-node-websql-git-18-0-0-9423671b: undefined 
npm WARN addRemoteGit Error: not found: git 
npm WARN addRemoteGit  at getNotFoundError (C:\Users\VA\AppData\Roaming\npm\node_modules\npm\node_modules\which\which.js:13:12) 
npm WARN addRemoteGit  at F (C:\Users\VA\AppData\Roaming\npm\node_modules\npm\node_modules\which\which.js:68:19) 
npm WARN addRemoteGit  at E (C:\Users\VA\AppData\Roaming\npm\node_modules\npm\node_modules\which\which.js:80:29) 
npm WARN addRemoteGit  at C:\Users\VA\AppData\Roaming\npm\node_modules\npm\node_modules\which\which.js:89:16 
npm WARN addRemoteGit  at C:\Users\VA\AppData\Roaming\npm\node_modules\npm\node_modules\which\node_modules\isexe\index.js:42:5 
npm WARN addRemoteGit  at C:\Users\VA\AppData\Roaming\npm\node_modules\npm\node_modules\which\node_modules\isexe\windows.js:36:5 
npm WARN addRemoteGit  at C:\Users\VA\AppData\Roaming\npm\node_modules\npm\node_modules\graceful-fs\polyfills.js:284:29 
npm WARN addRemoteGit  at FSReqWrap.oncomplete (fs.js:152:21) 
npm WARN addRemoteGit expo/node-websql#18.0.0 resetting remote C:\Users\VA\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\VA\AppData\Roaming\npm\node_modules\npm\node_modules\which\which.js:13:12) 
npm WARN addRemoteGit  at F (C:\Users\VA\AppData\Roaming\npm\node_modules\npm\node_modules\which\which.js:68:19) 
npm WARN addRemoteGit  at E (C:\Users\VA\AppData\Roaming\npm\node_modules\npm\node_modules\which\which.js:80:29) 
npm WARN addRemoteGit  at C:\Users\VA\AppData\Roaming\npm\node_modules\npm\node_modules\which\which.js:89:16 
npm WARN addRemoteGit  at C:\Users\VA\AppData\Roaming\npm\node_modules\npm\node_modules\which\node_modules\isexe\index.js:42:5 
npm WARN addRemoteGit  at C:\Users\VA\AppData\Roaming\npm\node_modules\npm\node_modules\which\node_modules\isexe\windows.js:36:5 
npm WARN addRemoteGit  at C:\Users\VA\AppData\Roaming\npm\node_modules\npm\node_modules\graceful-fs\polyfills.js:284:29 
npm WARN addRemoteGit  at FSReqWrap.oncomplete (fs.js:152:21) code: 'ENOGIT' } 
npm ERR! git clone --template=C:\Users\VA\AppData\Roaming\npm-cache\_git-remotes\_templates --mirror [email protected]:expo/node-websql.git C:\Users\VA\AppData\Roaming\npm-cache\_git-remotes\git-github-com-expo-node-websql-git-18-0-0-8213877d: undefined 
npm ERR! git clone --template=C:\Users\VA\AppData\Roaming\npm-cache\_git-remotes\_templates --mirror [email protected]:expo/node-websql.git C:\Users\VA\AppData\Roaming\npm-cache\_git-remotes\git-github-com-expo-node-websql-git-18-0-0-8213877d: undefined 
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! A complete log of this run can be found in: 
npm ERR!  C:\Users\VA\AppData\Roaming\npm-cache\_logs\2017-07-17T09_17_53_803Z-debug.log 
`npm install --save` failed 
+0

這不是一個git克隆錯誤,這是一個npm安裝錯誤。您可能會錯過git可執行文件(或者您的PATH中沒有正確定義它) –

回答

2

確保已安裝GIT在你的機器,如果不,去,並在這裏抓一個副本=>https://git-scm.com/downloads並根據您的環境下載/安裝。

如果你已經有其他的git客戶端(比如SmartGit,TortoiseGIT或SourceTree),你可以使用下面的命令來設置指向便攜式git的路徑。

set path=%PATH%;YOUR_GIT_PATH

希望這有助於!

0

我有同樣的問題 - 在我的情況下,它與Cygwin有關。安裝腳本需要以c:\開頭的絕對路徑,但在Cygwin環境中,這將是類似/cygdrive/c/的東西。所需的路徑無法解析,安裝失敗。

在這種情況下,解決方案很簡單:退出Cygwin並使用npm i的標準外殼。