0
由於反應原生應用程序可以在Windows中進行小的手動調整,所以我想安裝它。不能npm在Windows上安裝react-native
我順利地通過CLI gitcloned回購,但是當涉及到npm install
,控制檯拋出我:
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.debug.log有:
3616 error 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: Cloning into bare repository 'C:\Users\***\AppData\Roaming\npm-cache\_git-remotes\git-github-com-facebook-react-git-baa2986b'...
3616 error 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: fatal: unable to connect to github.com:
3616 error 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: github.com[0: 192.30.252.130]: errno=No error
3617 verbose stack Error: Command failed: git -c core.longpaths=true 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
3617 verbose stack Cloning into bare repository 'C:\Users\***\AppData\Roaming\npm-cache\_git-remotes\git-github-com-facebook-react-git-baa2986b'...
3617 verbose stack fatal: unable to connect to github.com:
3617 verbose stack github.com[0: 192.30.252.130]: errno=No error
3617 verbose stack
3617 verbose stack
3617 verbose stack at ChildProcess.exithandler (child_process.js:203:12)
3617 verbose stack at emitTwo (events.js:87:13)
3617 verbose stack at ChildProcess.emit (events.js:172:7)
3617 verbose stack at maybeClose (internal/child_process.js:817:16)
3617 verbose stack at Socket.<anonymous> (internal/child_process.js:319:11)
3617 verbose stack at emitOne (events.js:77:13)
3617 verbose stack at Socket.emit (events.js:169:7)
3617 verbose stack at Pipe._onclose (net.js:469:12)
3618 verbose cwd C:\Users\***\react-native
3619 error Windows_NT 6.1.7601
3620 error argv "C:\\Program Files (x86)\\nodejs\\node.exe" "C:\\Program Files (x86)\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install"
3621 error node v4.1.1
3622 error npm v2.14.4
3623 error code 128
3624 error Command failed: git -c core.longpaths=true 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
3624 error Cloning into bare repository 'C:\Users\***\AppData\Roaming\npm-cache\_git-remotes\git-github-com-facebook-react-git-baa2986b'...
3624 error fatal: unable to connect to github.com:
3624 error github.com[0: 192.30.252.130]: errno=No error
3625 error If you need help, you may report this error at:
3625 error <https://github.com/npm/npm/issues>
3626 verbose exit [ 1, true ]
請注意,由於個人信息,我用***隱藏了一些路徑。
問題是我可以完美地連接到Github,並對我的倉庫執行標準操作,並且可以手動克隆react-native回購。
我試過this,這似乎解決了我的問題,沒有任何成功。