when i used vue init webpack demo
it reported this error : " vue-cli 路 tunneling socket could not be established, cause=socket hang up"
It looks like an issue with npm caused by http proxies. Do you use a http proxy?
See npm/npm#2472
Closing this for now. Please re-open if you feel this is an issue with vue-cli.
i just fixed my problem .. so i thought i would share some info here
im using windows, all my components basically are working npm, git ..etc ..all communications are passing throught an http proxy
if im not mistaken no matter what you put on your npm config or git config .. vue-cli will always default to your system environement http_proxy .. in my case ..a also had this in my system env ..excepet it was in lowercase, this is ok for windows.. but for vue-cli to work .. it should be in uppercase..
so basically just put an HTTP_PROXY in your sys env .. and hopefully it should work
im having the same problem .. and yes im using an http proxy except .. npm is working ...
For me, I had to make sure the HTTPS_PROXY variable was set. I did it in ~/.zshrc but you could declare it in ~/.bashrc and then source it, or export it system-wide as well and then open a new terminal window.
I am still having this problem. I'm using
windows7,
[email protected],
[email protected] and
[email protected].
I am behind a corporate proxy and I am able to use npm and git through the proxy. My system environment variables are set as follows
HTTP_PROXY = "http://{IP address}:{port}/"
HTTPS_PROXY = "https://{IP address}:{port}/"
The proxy IP and port number in my system environment match the proxy settings I have in my npm config which I verify from the command line with npm config -g list and reading both proxy="http://{IP Address}:{Port}/ and https-proxy="https://{IP Address}:{Port}/". And yet when I command
vue init webpack vue-xperiment
I receive the error
vue-cli 路 Failed to download repo vuejs-templates/simple: tunneling socket could not be established, cause=socket hang up
How can I check directly from the command line which proxy settings the vue-cli is trying to use? Because either it isn't reading from the system environment vars, or else something else is blocking the connection.
@grugknuckle use proxychains resolve this problem
Almost the same error as above.
OS:
macOS Sierra Version 10.12.6
Docker:
Version 17.09.0-ce-mac35 (19611)
Channel: stable
a98b7c1b7c
Docker proxies:
Use system proxy
Docker Image:
https://hub.docker.com/r/ebiven/vue-cli/
[email protected]
[email protected]
[email protected]
npm install works well. But vue init webpack test failed.
npm install logs
root@1a04159d8336:/data/vuejs# npm install npmlog
npm info it worked if it ends with ok
npm info using [email protected]
npm info using [email protected]
npm http fetch GET 200 https://registry.npmjs.org/npmlog 488ms
npm http fetch GET 200 https://registry.npmjs.org/gauge 338ms
npm http fetch GET 200 https://registry.npmjs.org/are-we-there-yet 342ms
npm http fetch GET 200 https://registry.npmjs.org/console-control-strings 342ms
npm http fetch GET 200 https://registry.npmjs.org/set-blocking 342ms
npm http fetch GET 200 https://registry.npmjs.org/delegates 296ms
npm http fetch GET 304 https://registry.npmjs.org/readable-stream 298ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/string_decoder 340ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/core-util-is 342ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/isarray 344ms (from cache)
npm http fetch GET 200 https://registry.npmjs.org/inherits 348ms
npm http fetch GET 200 https://registry.npmjs.org/safe-buffer 349ms
vue init webpack failed logs:
root@1a04159d8336:/data/vuejs# vue init webpack test
? Target directory exists. Continue? Yes
vue-cli 路 Failed to download repo vuejs-templates/webpack: tunneling socket could not be established, cause=connect EINVAL 0.0.24.8:80 - Local (0.0.0.0:0)
@tonywangcn Did you fixed the problem? I meat the same problem.
@grugknuckle Did you manage to find out what was causing the issue? Same is happening for me.
@blueprintChris It was awhile ago. But I handled it with a hack. You won't like it.
The problem was the corporate proxy where I work. At the time, the IT administrator was changing things around and I couldn't be certain of the state of our internet access and what not. So, I went home - where I had internet access and no proxy - performed the cli command
vue init webpack vue-xperiment
to get an initial project. Then I committed the project to a remote git repository and drove back to work. I was able to then clone the repo to my local (at work) system. I have no idea why the git command line would tunnel through the proxy when the vue cli wouldn't.
But before you do that, try the following -
1) In your internet options, disable the proxy (if you can) and try the vue cli command that way.
2) if that doesn't work, try setting your environment variables with lower case property names. For example, use http_proxy instead of HTTP_PROXY. This worked for me on another proxy issue I had. (maybe with npm?)
@lifeMiik solved by remove http_proxy, https_proxy ...... in configuration of vuejs container (kitematic).
I have been faced with this problem for some time but now i found this other post where it was talking of cloning the templates e.g
git clone https://github.com/nativescript-vue/vue-cli-template.git C:UsersYour name.vue-templatesnativescript-vue-vue-cli-template
here wanted to use nativescript-templelate if you want to used webpack template replace the nativescript with webpack
And when initialize an application append '--offline' so this will use the local template which you have cloned......Hope this will help someone.
I solve the problem in centos 7(behind proxy):
Most helpful comment
I am still having this problem. I'm using
windows7,
[email protected],
[email protected] and
[email protected].
I am behind a corporate proxy and I am able to use npm and git through the proxy. My system environment variables are set as follows
HTTP_PROXY = "http://{IP address}:{port}/"
HTTPS_PROXY = "https://{IP address}:{port}/"
The proxy IP and port number in my system environment match the proxy settings I have in my npm config which I verify from the command line with
npm config -g listand reading bothproxy="http://{IP Address}:{Port}/andhttps-proxy="https://{IP Address}:{Port}/". And yet when I commandvue init webpack vue-xperimentI receive the error
vue-cli 路 Failed to download repo vuejs-templates/simple: tunneling socket could not be established, cause=socket hang upHow can I check directly from the command line which proxy settings the vue-cli is trying to use? Because either it isn't reading from the system environment vars, or else something else is blocking the connection.