Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/windows/16.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Node.js Can';t npm在Windows上安装react native_Node.js_Windows_Git_Npm_React Native - Fatal编程技术网

Node.js Can';t npm在Windows上安装react native

Node.js Can';t npm在Windows上安装react native,node.js,windows,git,npm,react-native,Node.js,Windows,Git,Npm,React Native,由于react本机应用程序可以在Windows中开发,只需稍作手动调整,所以我想安装它 我通过CLI成功地克隆了repo,但是当涉及到npm安装时,,控制台向我抛出以下问题: npm WARN addRemoteGit Error: Command failed: git -c core.longpaths=true config --get remote.origin.url npm WARN addRemoteGit npm WARN addRemoteGit at ChildPro

由于react本机应用程序可以在Windows中开发,只需稍作手动调整,所以我想安装它

我通过CLI成功地克隆了repo,但是当涉及到
npm安装时,
,控制台向我抛出以下问题:

npm WARN addRemoteGit Error: Command failed: git -c core.longpaths=true config --get remote.origin.url
npm WARN addRemoteGit
npm WARN addRemoteGit     at ChildProcess.exithandler (child_process.js:203:12)
npm WARN addRemoteGit     at emitTwo (events.js:87:13)
npm WARN addRemoteGit     at ChildProcess.emit (events.js:172:7)
npm WARN addRemoteGit     at maybeClose (internal/child_process.js:817:16)
npm WARN addRemoteGit     at Socket.<anonymous> (internal/child_process.js:319:11)
npm WARN addRemoteGit     at emitOne (events.js:77:13)
npm WARN addRemoteGit     at Socket.emit (events.js:169:7)
npm WARN addRemoteGit     at Pipe._onclose (net.js:469:12)
npm WARN addRemoteGit  git://github.com/facebook/react.git#b4e74e38e43ac53af8acd62c78c9213be0194245 resetting remote C:\
Users\***\AppData\Roaming\npm-cache\_git-remotes\git-github-com-facebook-react-git-baa2986b because of error: { [Error:
 Command failed: git -c core.longpaths=true config --get remote.origin.url
npm WARN addRemoteGit ]
npm WARN addRemoteGit   killed: false,
npm WARN addRemoteGit   code: 1,
npm WARN addRemoteGit   signal: null,
npm WARN addRemoteGit   cmd: 'git -c core.longpaths=true config --get remote.origin.url' }
npm ERR! git clone --template=C:\Users\***\AppData\Roaming\npm-cache\_git-remotes\_templates --mirror git://github.com/
facebook/react.git C:\Users\***\AppData\Roaming\npm-cache\_git-remotes\git-github-com-facebook-react-git-baa2986b: Clon
ing into bare repository 'C:\Users\***\AppData\Roaming\npm-cache\_git-remotes\git-github-com-facebook-react-git-baa2986
b'...
npm ERR! git clone --template=C:\Users\***\AppData\Roaming\npm-cache\_git-remotes\_templates --mirror git://github.com/
facebook/react.git C:\Users\***\AppData\Roaming\npm-cache\_git-remotes\git-github-com-facebook-react-git-baa2986b: fata
l: unable to connect to github.com:
npm ERR! git clone --template=C:\Users\***\AppData\Roaming\npm-cache\_git-remotes\_templates --mirror git://github.com/
facebook/react.git C:\Users\***\AppData\Roaming\npm-cache\_git-remotes\git-github-com-facebook-react-git-baa2986b: gith
ub.com[0: 192.30.252.130]: errno=No error
npm ERR! Windows_NT 6.1.7601
npm ERR! argv "C:\\Program Files (x86)\\nodejs\\node.exe" "C:\\Program Files (x86)\\nodejs\\node_modules\\npm\\bin\\npm-
cli.js" "install"
npm ERR! node v4.1.1
npm ERR! npm  v2.14.4
npm ERR! code 128

npm ERR! Command failed: git -c core.longpaths=true clone --template=C:\Users\***\AppData\Roaming\npm-cache\_git-remote
s\_templates --mirror git://github.com/facebook/react.git C:\Users\***\AppData\Roaming\npm-cache\_git-remotes\git-githu
b-com-facebook-react-git-baa2986b
npm ERR! Cloning into bare repository 'C:\Users\***\AppData\Roaming\npm-cache\_git-remotes\git-github-com-facebook-reac
t-git-baa2986b'...
npm ERR! fatal: unable to connect to github.com:
npm ERR! github.com[0: 192.30.252.130]: errno=No error
npm ERR!
npm ERR!
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR!     <https://github.com/npm/npm/issues>

npm ERR! Please include the following file with any support request:
npm ERR!     C:\Users\***\react-native\npm-debug.log
npm WARN addRemoteGit错误:命令失败:git-c core.longpaths=true config--get remote.origin.url
npm WARN addRemoteGit
ChildProcess.exithandler(child_process.js:203:12)上的npm WARN addRemoteGit
npm在emitTwo上警告addRemoteGit(events.js:87:13)
ChildProcess.emit(events.js:172:7)上的npm WARN addRemoteGit
位于maybeClose的npm WARN addRemoteGit(internal/child_process.js:817:16)

npm WARN addRemoteGit at Socket.,这似乎解决了我的问题,但没有任何成功。

问题发生的原因是我支持一个公司代理。我通过跑步解决了这个问题

git config --global url."https://".insteadOf git://

这将强制所有到GitHub的连接都通过https。

由于我是公司代理的后台,所以出现了问题。我通过跑步解决了这个问题

git config --global url."https://".insteadOf git://
它强制所有到GitHub的连接都通过https进行