Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot install webpack-cli using npm #182

Closed
trignolo opened this issue Sep 1, 2017 · 23 comments · Fixed by #259
Closed

Cannot install webpack-cli using npm #182

trignolo opened this issue Sep 1, 2017 · 23 comments · Fixed by #259

Comments

@trignolo
Copy link

trignolo commented Sep 1, 2017

I'm trying to install webpack-cli with npm, but I'm getting error code 128.

Thanks in advance

@evenstensberg
Copy link
Member

Hi! Could you post a stacktrace for us? I.E print a screenshot of your terminal?

@trignolo
Copy link
Author

trignolo commented Sep 1, 2017

Sure, here it is:

sudo npm install -g webpack-cli
Password:
npm ERR! Error while executing:
npm ERR! /usr/bin/git ls-remote -h -t git://github.com/kalcifer/recast.git
npm ERR!
npm ERR! fatal: unable to connect to github.com:
npm ERR! github.com[0: 192.30.253.113]: errno=Operation timed out
npm ERR! github.com[1: 192.30.253.112]: errno=Operation timed out
npm ERR!
npm ERR!
npm ERR! exited with error code: 128

npm ERR! A complete log of this run can be found in:
npm ERR! /Users/.../.npm/_logs/2017-09-01T14_53_03_375Z-debug.log

@ematipico
Copy link
Contributor

Are you behind a proxy? It looks like it's related to the cli but to a connection error to github

@trignolo
Copy link
Author

trignolo commented Sep 1, 2017

I've also realized that is a connection problem looking at the logs, but I've never experienced a problem like this in the recent past with other tools.

My first googlings take on this issue:

#165

that seems to be the exact problem that I have now.

So I think that it's not very likely that is a proxy problem. But I'm investigating yet with infos from ev1stensberg.

@trignolo
Copy link
Author

trignolo commented Sep 1, 2017

A little update: I attach a clean log of the exceution of the command. What I see is that the connection time out is related to this repo:

/usr/bin/git ls-remote -h -t git://github.com/kalcifer/recast.git

2017-09-01T15_20_12_242Z-debug.log.txt

@evenstensberg
Copy link
Member

@trignolo Recast & Yeoman are local forks, so that makes sense. Planning to remove those after we've migrated into webpack-addons

@RobotnickIsrael
Copy link

Any updates on this issue?
I want to use the cli to migrate my project from webpack 1.X to 2.X (and later 3\4).
When do you thing the migration to webpack-addons will finish?
Will it affect the migration tool?

Thanks

@wojtekmaj
Copy link

I get similar error:

> npm install webpack-cli@latest
npm ERR! Error while executing:
npm ERR! C:\Program Files\Git\cmd\git.EXE ls-remote -h -t git://github.com/ev1stensberg/generator.git
npm ERR!
npm ERR! fatal: unable to connect to github.com:
npm ERR! github.com[0: 192.30.253.112]: errno=No such file or directory
npm ERR! github.com[1: 192.30.253.113]: errno=No such file or directory
npm ERR!
npm ERR!
npm ERR! exited with error code: 128

npm ERR! A complete log of this run can be found in:

@internetErik
Copy link

I also get the same 'error' as above. I think it may have to do with some kind of local network settings.

If I try running these commands:

git ls-remote -h -t git://github.com/ev1stensberg/generator.git

git ls-remote -h -t https://github.com/ev1stensberg/generator.git

The second command works, while the first doesn't. So the issue (at least for me) seems connected to the use of the git protocol.

@evenstensberg
Copy link
Member

It's the fork that won't let you download through a secure network. Planning to fix this soon, promise. Alternative is to download the generator manually and link it to a cloned version of the cli if you really need to use it

@erikchristianson
Copy link

@ev1stensberg Thanks

@dchhetri
Copy link

👍 Waiting on the fix here as well. Best.

@tgandrews
Copy link

Is the switch to use https instead of git protocol an option? At the moment we cannot install this as we are behind a proxy. The workaround of cloning and linking seems unnecessary if a protocol fix is quick and works.

@ematipico
Copy link
Contributor

Just made a PR as temporary fix :)

@evenstensberg
Copy link
Member

Awesome sauce 🎉🎉

@erikchristianson
Copy link

Any chance a new version of webpack-cli, with the recent merge, could be published on npm?

@evenstensberg
Copy link
Member

I'll have a chat with the team this week. We need to merge some long standing PRs like adding test cases from webpack and another minor one

@erikchristianson
Copy link

@ev1stensberg Any word on when a new version can be published to npm? Very inconvenient not being able to run npm install on certain projects while in the office.

@evenstensberg
Copy link
Member

yarn add webpack-cli 2.0.5 out now

@TomFoyster
Copy link

I'm still unable to npm install webpack-cli? Is this meant to have been fixed?

@dhruvdutt
Copy link
Member

@TomFoyster Most likely it could be because of #161. There's currently an issue with installation when we're behind a proxy.

@TomFoyster
Copy link

@dhruvdutt Correct, I found that weirdly if I connected to our VPN I was able to download it without issue!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.