Repository navigation
NPM git dependency's not installing #295
Copy link
Copy link
Closed
Milestone
Description
Not sure if this is an NPM issue, but after installing the io.js nightly I am unable to install git dependancies. If this is an NPM issue I can log it there.
I was previously using
NPM 2.2.0
Node 0.12
On OS X 10.10
For example using this package.json
{
"dependencies": {
"async": "git+ssh://git@github.com:caolan/async.git#master"
}
}
gives this error
0 info it worked if it ends with ok
1 verbose cli [ 'node', '/usr/local/bin/npm', 'install' ]
2 info using npm@2.2.0
3 info using node@v1.0.0-nightly201501111b8f37bb4d
4 verbose node symlink /usr/local/bin/node
5 warn package.json @ No description
6 warn package.json @ No repository field.
7 warn package.json @ No README data
8 verbose install where, deps [ '/Users/corbinu/Desktop', [ 'async' ] ]
9 verbose install where, peers [ '/Users/corbinu/Desktop', [] ]
10 info preinstall @
11 silly cache add args [ 'async@git+ssh://git@github.com:caolan/async.git#master',
11 silly cache add null ]
12 verbose cache add spec async@git+ssh://git@github.com:caolan/async.git#master
13 silly cache add parsed spec { raw: 'async@git+ssh://git@github.com:caolan/async.git#master',
13 silly cache add scope: null,
13 silly cache add name: 'async',
13 silly cache add rawSpec: 'git+ssh://git@github.com:caolan/async.git#master',
13 silly cache add spec: 'ssh://git@github.com:caolan/async.git#master',
13 silly cache add type: 'git' }
14 verbose addRemoteGit u="ssh://git@github.com:caolan/async.git#master" silent=false
15 silly addRemoteGit normalized { url: 'ssh://git@github.com:caolan/async.git',
15 silly addRemoteGit branch: 'master' }
16 silly addRemoteGit v ssh-git-github-com-caolan-async-git-bea77bff
17 verbose addRemoteGit /Users/corbinu/.npm/_git-remotes/ssh-git-github-com-caolan-async-git-bea77bff not in flight; cloning
18 info git [ 'clone',
18 info git '--template=/Users/corbinu/.npm/_git-remotes/_templates',
18 info git '--mirror',
18 info git 'ssh://git@github.com:caolan/async.git',
18 info git '/Users/corbinu/.npm/_git-remotes/ssh-git-github-com-caolan-async-git-bea77bff' ]
19 error git clone ssh://git@github.com:caolan/async.git Cloning into bare repository '/Users/corbinu/.npm/_git-remotes/ssh-git-github-com-caolan-async-git-bea77bff'...
19 error git clone ssh://git@github.com:caolan/async.git ERROR: Repository not found.
19 error git clone ssh://git@github.com:caolan/async.git fatal: Could not read from remote repository.
19 error git clone ssh://git@github.com:caolan/async.git
19 error git clone ssh://git@github.com:caolan/async.git Please make sure you have the correct access rights
19 error git clone ssh://git@github.com:caolan/async.git and the repository exists.
20 verbose stack Error: Command failed: git clone --template=/Users/corbinu/.npm/_git-remotes/_templates --mirror ssh://git@github.com:caolan/async.git /Users/corbinu/.npm/_git-remotes/ssh-git-github-com-caolan-async-git-bea77bff
20 verbose stack Cloning into bare repository '/Users/corbinu/.npm/_git-remotes/ssh-git-github-com-caolan-async-git-bea77bff'...
20 verbose stack ERROR: Repository not found.
20 verbose stack fatal: Could not read from remote repository.
20 verbose stack
20 verbose stack Please make sure you have the correct access rights
20 verbose stack and the repository exists.
20 verbose stack
20 verbose stack at ChildProcess.exithandler (child_process.js:736:12)
20 verbose stack at ChildProcess.emit (events.js:119:17)
20 verbose stack at maybeClose (child_process.js:1000:16)
20 verbose stack at Socket.<anonymous> (child_process.js:1168:11)
20 verbose stack at Socket.emit (events.js:116:17)
20 verbose stack at Pipe.close (net.js:477:12)
21 verbose cwd /Users/corbinu/Desktop
22 error Darwin 14.1.0
23 error argv "node" "/usr/local/bin/npm" "install"
24 error node v1.0.0-nightly201501111b8f37bb4d
25 error npm v2.2.0
26 error code 128
27 error Command failed: git clone --template=/Users/corbinu/.npm/_git-remotes/_templates --mirror ssh://git@github.com:caolan/async.git /Users/corbinu/.npm/_git-remotes/ssh-git-github-com-caolan-async-git-bea77bff
27 error Cloning into bare repository '/Users/corbinu/.npm/_git-remotes/ssh-git-github-com-caolan-async-git-bea77bff'...
27 error ERROR: Repository not found.
27 error fatal: Could not read from remote repository.
27 error
27 error Please make sure you have the correct access rights
27 error and the repository exists.
28 error If you need help, you may report this error at:
28 error <https://github.com/npm/npm/issues>
29 verbose exit [ 1, true ]
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
Activity
rvagg commentedon Jan 12, 2015
/cc @othiym23
evanlucas commentedon Jan 12, 2015
It looks like the url parsing is a little off.
With node v0.10.35, the
url.parsereturns something like:but with the latest nightly:
Looks like it may have been introduced in c90eac7
rvagg commentedon Jan 12, 2015
@evanlucas if you're sure that's the commit could you cc the author into this thread?
evanlucas commentedon Jan 12, 2015
/cc @jondavidjohn
corbinu commentedon Jan 12, 2015
I tried rolling back that commit and building but still have the same issue
evanlucas commentedon Jan 12, 2015
ah, sorry, looks like 6120472 was the original
evanlucas commentedon Jan 12, 2015
After looking further into it, it looks like d312b6d#diff-bbc5176adff1bbc01acd61bfc85d049fR407 made a change that will also prevent npm from installing git dependencies as prior to that commit,
pathnamewas not being set tothis.pathbnoordhuis commentedon Jan 12, 2015
#299 has landed but
npm install "git+ssh://git@github.com:caolan/async.git#master"still doesn't work because of d312b6d. I'm going to prepare a revert of that commit. Anyone who knows of a better solution, please speak up now.bnoordhuis commentedon Jan 12, 2015
This should be fixed by commits a1e54d6 and 913addb. Thanks for the bug report, @corbinu, and thanks @evanlucas for helping out.
corbinu commentedon Jan 12, 2015
Thanks so much guys. Working for me. Will keep testing. Can't wait for the release
qingyuansihai commentedon Mar 22, 2019
i've ever meet this issue