$ vue init webpack myproject
This will install Vue 2.x version of template.
For Vue 1.x use: vue init webpack#1.0 myproject
vue-cli · Failed to download repo vuejs-templates/webpack: tunneling socket could not be established, cause=getaddrinfo ENOTFOUND server server:80
上面是win10初始化webpack-simple模板报错信息~!求解~!
IMPORTANT: Did the vue init command itself result in an error?
-> NO: If the files for a project template were correctly created, but did
not work out-of-the-box as you expected, please open an issue for the
appropriate template at github.com/vuejs-templates
-> YES: Open an issue here. Please include the exact command you used,
what you expected to happen, and what happened instead.
-->
Fail to download template from vuejs-templates/webpack. It's your poor internet connection, or probably GFW, if you'd argue.
Hi guys,
I'm trying Vue using vue-cli, but an error occurs when I execute vue init webpack my-project: This socket is closed. What am I doing wrong?
node.version = 7.1.0
npm.version = 4.0.0
vue-cli.version=2.5.0
D:\Projects>vue init webpack vuetest
This will install Vue 2.x version of template.
For Vue 1.x use: vue init webpack#1.0 vuetest
events.js:160
throw er; // Unhandled 'error' event
^
Error: This socket is closed
at WriteStream.Socket._writeGeneric (net.js:683:19)
at WriteStream.Socket._write (net.js:734:8)
at doWrite (_stream_writable.js:334:12)
at writeOrBuffer (_stream_writable.js:320:5)
at WriteStream.Writable.write (_stream_writable.js:247:11)
at WriteStream.Socket.write (net.js:661:40)
at Console.warn (console.js:51:16)
at Object.exports.fatal (C:\Users\Anderson\AppData\Roaming\npm\node_modules\vue-cli\lib\logger.js:31:11)
at C:\Users\Anderson\AppData\Roaming\npm\node_modules\vue-cli\bin\vue-init:141:23
at Metalsmith.<anonymous> (C:\Users\Anderson\AppData\Roaming\npm\node_modules\vue-cli\lib\generate.js:52:7)
at Immediate.<anonymous> (C:\Users\Anderson\AppData\Roaming\npm\node_modules\vue-cli\node_modules\co\index.js:52:14)
at runCallback (timers.js:637:20)
at tryOnImmediate (timers.js:610:5)
at processImmediate [as _immediateCallback] (timers.js:582:5)
@aaroeiraa looks like a networking problem to me. Did you try running it again later?
Hi @zigomir
I tried now, but the error persists.
I don't have any proxy or special network configuration.
I'm from Brazil.
Pinging www.google.com.br [216.58.222.67] with 32 bytes of data:
Reply from 216.58.222.67: bytes=32 time=20ms TTL=57
Reply from 216.58.222.67: bytes=32 time=24ms TTL=57
Reply from 216.58.222.67: bytes=32 time=26ms TTL=57
Reply from 216.58.222.67: bytes=32 time=20ms TTL=57
D:\Projects>vue init webpack myproject
This will install Vue 2.x version of template.
For Vue 1.x use: vue init webpack#1.0 myproject
events.js:160
throw er; // Unhandled 'error' event
^
Error: This socket is closed
Weird, works for me atm :/
So, is something in my dev environment. Thank you for your support!
This is my network, has been resolved, I would like to thank ~!
@aaroeiraa closing since the original issue is resolved. Please open separate if your issue persists.
Hi guys,
I'm here only to give you feedback about this issue. Node version 7.1 was the problem. https://github.com/nodejs/node/issues/9542
vue-cli · Failed to download repo vuejs-templates/webpack: unable to get loc
al issuer certificate
I turned off my VPN, reopen terminal, then it works.
vue-cli · Failed to download repo vuejs-templates/webpack: tunneling socket could not be established, cause=getaddrinfo ENOTFOUND proxy_server proxy_server:8080
Most helpful comment
Fail to download template from vuejs-templates/webpack. It's your poor internet connection, or probably GFW, if you'd argue.