内网屏蔽访问外网了,需要用代理
自己用系统级代理吧,后面还要用 npm,vue-cli 有代理也没用。
windows 7 環境下有proxy, vue init 會出現
vue-cli · tunneling socket could not be established, cause=socket hang up
這個有解嗎?
Window试试:
set HTTP_PROXY=http://proxy.com && set HTTPS_PROXY=http://proxy.com && vue init webpack fb2
You should be able to install Vue behind a proxy (there is alwas a proxy in EU) and the proxy is just the first step. There are also Artifactory-Servers. Big companies use all their own repositories (they pull packages on demand) and they may not be connected to the Internet directly. Therefore the ability to say Vue using the same settings set by npm is essential. I'am not an inftrastructure expert, maybe there is an easier way to do it?
Difference to Angular: Angular does not download a template before the project is created, it creates only a package json and let npm/yarn install packages. In most cases npm/yarn has company-wide configurations.
In case of Vue, there must be http(s)_proxy configurations set. And in some circumstances you may not access to the Internet from command line. (Sorry, we are in Europe).
Most helpful comment
Window试试: