Closed travelbasys closed 9 years ago
When you install with -g
you must be an admin/have admin privileges, on windows I believe. Are you able to install any other packages with -g
(grunt-cli for example)?
I think it's something else
npm ERR! git clone git://github.com/timaschew/cogent Cloning into bare repository 'C:\Users\kauker\AppData\Roaming\npm-cache_git-re
motes\git-github-com-timaschew-cogent-5e7bf87a'...
npm ERR! git clone git://github.com/timaschew/cogent fatal: unable to connect to github.com:
notice the unable to connect to github.com
message when trying to install cogent
I think you should check that you are actually able to clone the repository by yourself
Can you run git clone git://github.com/timaschew/cogent
and check it doesn't fail?
If it does, you should probably update git or your git credentials.
what is your npm version?
and can you try this one
package.json
:{
"name": "component-test",
"version": "0.0.1",
"dependencies": {
"cogent": "git+https://github.com/timaschew/cogent#fix-redirects",
}
}
npm install
Does this work for you?
Solution found!
@netpoetica: Yes, I did have admin privilege. But I could not install -g grunt-cli. Same error messages. @cristiandouce: Yes, the problem is with the "git:" url. git clone git://github.com/timaschew/cogent fails but git clone https://github.com/timaschew/cogent is ok. I always use https: when cloning from github. I am sitting behind a firewall. @timaschew: I tried your example, but it failed, too.
A solution is given on this page: https://coderwall.com/p/sitezg/force-git-to-clone-with-https-instead-of-git-urls
git config --global url."https://github.com".insteadOf git://github.com
replaces the git: protocol by https: on github.com. After that, npm install -g component worked fine.
Thank you to all contributors.
Glad you found a solution, thank you for sharing!
Hello... I was not able to install component on a Windows 7 machine. Git version is: 1.9.4.msysgit.2 Thank you.
Here is the relevant output: ... npm http GET https://registry.npmjs.org/escodegen npm http GET https://registry.npmjs.org/ast-types npm WARN
git config --get remote.origin.url
returned wrong result (git://github.com/ariya/esprima.git) npm http GET https://registry.npmjs.org/recast npm http GET https://registry.npmjs.org/private npm http GET https://registry.npmjs.org/defs npm http 304 https://registry.npmjs.org/escodegen npm http 304 https://registry.npmjs.org/ast-types npm http 304 https://registry.npmjs.org/ftp npm http 304 https://registry.npmjs.org/recast npm http 304 https://registry.npmjs.org/defs npm http GET https://registry.npmjs.org/xregexp/2.0.0 npm http 304 https://registry.npmjs.org/private npm http 304 https://registry.npmjs.org/xregexp/2.0.0 npm http GET https://registry.npmjs.org/core-util-is npm http GET https://registry.npmjs.org/isarray/0.0.1 npm http GET https://registry.npmjs.org/string_decoder npm http 304 https://registry.npmjs.org/core-util-is npm http 304 https://registry.npmjs.org/isarray/0.0.1 npm http 304 https://registry.npmjs.org/string_decoder npm ERR! git clone git://github.com/timaschew/cogent Cloning into bare repository 'C:\Users\kauker\AppData\Roaming\npm-cache_git-re motes\git-github-com-timaschew-cogent-5e7bf87a'... npm ERR! git clone git://github.com/timaschew/cogent fatal: unable to connect to github.com: npm ERR! git clone git://github.com/timaschew/cogent github.com[0: 192.30.252.130]: errno=No error npm ERR! Error: Command failed: Cloning into bare repository 'C:\Users\kauker\AppData\Roaming\npm-cache_git-remotes\git-github-com- timaschew-cogent-5e7bf87a'... 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! at ChildProcess.exithandler (child_process.js:637:15) npm ERR! at ChildProcess.EventEmitter.emit (events.js:98:17) npm ERR! at maybeClose (child_process.js:735:16) npm ERR! at Process.ChildProcess._handle.onexit (child_process.js:802:5) npm ERR! If you need help, you may report this log at: npm ERR! http://github.com/isaacs/npm/issues npm ERR! or email it to: npm ERR! npm-@googlegroups.comnpm ERR! System Windows_NT 6.1.7601 npm ERR! command "C:\Users\kauker\Programs\nodejs\node.exe" "C:\Users\kauker\Programs\nodejs\node_modules\npm\bin\npm -cli.js" "install" "-g" "component" npm ERR! cwd C:\tmp npm ERR! node -v v0.10.18 npm ERR! npm -v 1.3.8 npm ERR! code 128 npm ERR! git clone git://github.com/ariya/esprima.git Cloning into bare repository 'C:\Users\kauker\AppData\Roaming\npm-cache_git-r emotes\git-github-com-ariya-esprima-git-9077e517'... npm ERR! git clone git://github.com/ariya/esprima.git fatal: unable to connect to github.com: npm ERR! git clone git://github.com/ariya/esprima.git github.com[0: 192.30.252.130]: errno=No error npm ERR! npm ERR! Additional logging details can be found in: npm ERR! C:\tmp\npm-debug.log npm ERR! not ok code 0