我在package.json
:
"gulp": "github:gulpjs/gulp#4.0",
这已经工作了一段时间,但突然间我收到以下错误:
λ npm i
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:206:12)
npm WARN addRemoteGit at emitTwo (events.js:106:13)
npm WARN addRemoteGit at ChildProcess.emit (events.js:191:7)
npm WARN addRemoteGit at maybeClose (internal/child_process.js:852:16)
npm WARN addRemoteGit at Socket.<anonymous> (internal/child_process.js:323:11)
npm WARN addRemoteGit at emitOne (events.js:96:13)
npm WARN addRemoteGit at Socket.emit (events.js:188:7)
npm WARN addRemoteGit at Pipe._handle.close [as _onclose] (net.js:492:12)
npm WARN addRemoteGit gulpjs/gulp#4.0 resetting remote C:\Users\ekalkj\AppData\Roaming\npm-cache\_git-remotes\git-github-com-gulpjs-gulp-git-4-0-ecf98f08 because of error: { 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:206:12)
npm WARN addRemoteGit at emitTwo (events.js:106:13)
npm WARN addRemoteGit at ChildProcess.emit (events.js:191:7)
npm WARN addRemoteGit at maybeClose (internal/child_process.js:852:16)
npm WARN addRemoteGit at Socket.<anonymous> (internal/child_process.js:323:11)
npm WARN addRemoteGit at emitOne (events.js:96:13)
npm WARN addRemoteGit at Socket.emit (events.js:188:7)
npm WARN addRemoteGit at Pipe._handle.close [as _onclose] (net.js:492:12)
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\ekalkj\AppData\Roaming\npm-cache\_git-remotes\_templates --mirror git://github.com/gulpjs/gulp.git C:\Users\ekalkj\AppData\Roaming\npm-cache\_git-remotes\git-github-com-gulpjs-gulp-git-4-0-ecf98f08: Cloning into bare repository 'C:\Users\ekalkj\AppData\Roaming\npm-cache\_git-remotes\git-github-com-gulpjs-gulp-git-4-0-ecf98f08'...
npm WARN addRemoteGit gulpjs/gulp#4.0 pre-existing cached repo C:\Users\ekalkj\AppData\Roaming\npm-cache\_git-remotes\git-https-github-com-gulpjs-gulp-git-4-0-4b46db44 points to undefined and not https://github.com/gulpjs/gulp.git
npm ERR! git submodule -q update --init --recursive: Unable to determine absolute path of git directory
npm ERR! git submodule -q update --init --recursive:
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:206:12)
npm WARN addRemoteGit at emitTwo (events.js:106:13)
npm WARN addRemoteGit at ChildProcess.emit (events.js:191:7)
npm WARN addRemoteGit at maybeClose (internal/child_process.js:852:16)
npm WARN addRemoteGit at Process.ChildProcess._handle.onexit (internal/child_process.js:215:5)
npm WARN addRemoteGit gulpjs/gulp#4.0 resetting remote C:\Users\ekalkj\AppData\Roaming\npm-cache\_git-remotes\git-github-com-gulpjs-gulp-git-4-0-7c06e801 because of error: { 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:206:12)
npm WARN addRemoteGit at emitTwo (events.js:106:13)
npm WARN addRemoteGit at ChildProcess.emit (events.js:191:7)
npm WARN addRemoteGit at maybeClose (internal/child_process.js:852:16)
npm WARN addRemoteGit at Process.ChildProcess._handle.onexit (internal/child_process.js:215:5)
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\ekalkj\AppData\Roaming\npm-cache\_git-remotes\_templates --mirror git@github.com:gulpjs/gulp.git C:\Users\ekalkj\AppData\Roaming\npm-cache\_git-remotes\git-github-com-gulpjs-gulp-git-4-0-7c06e801: Cloning into bare repository 'C:\Users\ekalkj\AppData\Roaming\npm-cache\_git-remotes\git-github-com-gulpjs-gulp-git-4-0-7c06e801'...
npm ERR! git clone --template=C:\Users\ekalkj\AppData\Roaming\npm-cache\_git-remotes\_templates --mirror git@github.com:gulpjs/gulp.git C:\Users\ekalkj\AppData\Roaming\npm-cache\_git-remotes\git-github-com-gulpjs-gulp-git-4-0-7c06e801: ssh: connect to host github.com port 22: Connection timed out
npm ERR! Windows_NT 6.1.7601
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\ekalkj\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js" "i"
npm ERR! node v6.4.0
npm ERR! npm v3.10.7
npm ERR! code 128
npm ERR! Command failed: git -c core.longpaths=true clone --template=C:\Users\ekalkj\AppData\Roaming\npm-cache\_git-remotes\_templates --mirror git@github.com:gulpjs/gulp.git C:\Users\ekalkj\AppData\Roaming\npm-cache\_git-remotes\git-github-com-gulpjs-gulp-git-4-0-7c06e801
npm ERR! Cloning into bare repository 'C:\Users\ekalkj\AppData\Roaming\npm-cache\_git-remotes\git-github-com-gulpjs-gulp-git-4-0-7c06e801'...
npm ERR! ssh: connect to host github.com port 22: Connection timed out
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:\Projects\danskespil.website\npm-debug.log
当我删除gulp 4依赖时,它的工作应该是这样。
执行npm install glob-fs
时会发生同样的事情,而不是那么奇怪,因为它也会使用branch or tag。
我认为它可能是企业代理,而npm在点击分支或标记时会做其他事情。
我尝试了git config --global url."https://github.com/".insteadOf git@github.com:
,但没有运气,只是一个新错误:
npm ERR! git submodule -q update --init --recursive: Unable to determine absolute path of git directory
npm ERR! git submodule -q update --init --recursive:
npm ERR! git submodule -q update --init --recursive: Unable to determine absolute path of git directory
npm ERR! git submodule -q update --init --recursive:
npm ERR! Windows_NT 6.1.7601
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\ekalkj\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js" "install" "glob-fs"
npm ERR! node v6.4.0
npm ERR! npm v3.10.7
npm ERR! code 1
npm ERR! Command failed: git -c core.longpaths=true submodule -q update --init --recursive
npm ERR! Unable to determine absolute path of git directory
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:\Projects\danskespil.website\npm-debug.log
我尝试更新git-for-windows,nodejs和npm没有运气。我尝试在没有运气的情况下为NPM配置添加代理。我有点迷失了,那么这个问题的下一个调试步骤是什么?
答案 0 :(得分:2)
github:gulpjs/gulp#4.0
表示您希望存储库https://github.com/gulpjs/gulp/tags
中的4.0标记没有标签4.0
也许有一个它被删除了,我不知道,但是从今天开始,这无法发挥作用。
Gulp在上午https://www.npmjs.com/package/gulp 所以没有必要这样写。
你应该:
"gulp":"3.9.1"
[编辑]
是的,我的坏,有一个分支4.0所以也许试试这个:
"gulp":"git+ssh://git@github.com:gulpjs/gulp#4.0"
或
"gulp":"https://github.com/gulpjs/gulp.git#4.0"
无论如何,你真的需要一个未发布的gulp分支吗?