Javascript 如何解决这个问题
我试图设置react本机项目,但遇到了如何解决此问题的错误Javascript 如何解决这个问题,javascript,node.js,react-native,npm,Javascript,Node.js,React Native,Npm,我试图设置react本机项目,但遇到了如何解决此问题的错误 npm WARN react-redux@5.0.5 requires a peer of react@^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
npm WARN react-redux@5.0.5 requires a peer of react@^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 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-8213877d: 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-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
确保您已经在您的计算机中安装了GIT,如果没有,请在此处获取副本=>并根据您的环境下载/安装 如果您已经有任何其他git客户端(如SmartGit、TortoiseGIT或SourceTree),您可以使用下面的命令设置指向便携git的路径
设置路径=%path%;您的\u GIT\u路径
希望这有帮助 确保您已在计算机中安装了GIT,如果未安装,请在此处获取副本=>并根据您的环境下载/安装 如果您已经有任何其他git客户端(如SmartGit、TortoiseGIT或SourceTree),您可以使用下面的命令设置指向便携git的路径
设置路径=%path%;您的\u GIT\u路径
希望这有帮助 我也有同样的问题——就我而言,这与Cygwin有关。安装脚本需要以
c:\
开头的绝对路径,但在Cygwin环境中,这类似于/cygdrive/c/
。无法解析所需路径,安装失败
在这种情况下,解决方案很简单:退出Cygwin并使用标准shell for
npmi
我也遇到了同样的问题——在我的情况下,它与Cygwin有关。安装脚本需要以c:\
开头的绝对路径,但在Cygwin环境中,这类似于/cygdrive/c/
。无法解析所需路径,安装失败
在这种情况下,解决方案很简单:退出Cygwin并使用标准shell for
npmi
这不是git克隆错误,而是npm安装错误。您可能缺少git可执行文件(或者在路径中没有正确定义)。这不是git克隆错误,这是npm安装错误。您可能缺少git可执行文件(或者在路径中没有正确定义)