Mac电脑npm:Failed to download repo vuejs-templates/webpack: tunneling socket could not be established,
2018-02-06 19:04
2581 查看
博主最近在使用vue时,通过:
时一直报错:
Failed to download repo vuejs-templates/webpack: tunneling socket could not be established, cause=connect ETIMEDOUT
多方寻求答案无果,最后找到一种方法来解决:
输入以上命令行继续执行即可。
但是这里要注意一个问题,Mac环境下使用npm时最好加上sudo,并且npm加上c为cnpm来使用。
最后的结果为
完整的执行代码放下面:
vue init webpack vuecliTest
时一直报错:
Failed to download repo vuejs-templates/webpack: tunneling socket could not be established, cause=connect ETIMEDOUT
多方寻求答案无果,最后找到一种方法来解决:
npm config rm proxy npm config rm https-proxy
输入以上命令行继续执行即可。
但是这里要注意一个问题,Mac环境下使用npm时最好加上sudo,并且npm加上c为cnpm来使用。
最后的结果为
sudo vue init webpack vuecliTest
完整的执行代码放下面:
sudo cnpm install --global vue-cli sudo vue init webpack my-project cd my-project npm install npm run dev
相关文章推荐
- vue-li安装失败Failed to download repo vuejs-templates/webapck-simple: Response code 404 (Not Found)
- npm ERR! network tunneling socket could not be established, cause=connect ECONNR
- Request for package information failed: tunneling socket could not be established, cause=14033355594
- npm won't install packages “npm ERR! network tunneling socket could not be established, cause=Parse Error”
- vue-cli Failed to download repo vuejs-templates/webapck: Response code 404 (Not Found)
- vue-cli · Failed to download repo vuejs-templates?
- (错误)启动ActiveMQ报错:Transport Connector could not be registered in JMX: java.io.IOException: Failed to bind to server socket: stomp://0.0.0.0:61613?
- Transport Connector could not be registered in JMX: Failed to bind to server socket
- svn post-commit hook failed error output could not be translated from the native locale to UTF-8
- Failed to execute request because the App-Domain could not be created. Error: 0×80131902的解决方法
- asp.net2.0發佈到本機IIS報錯:Failed to execute request because the App-Domain could not be created. Error: 0×80070005 儲存被拒絕.
- Failed to configure a DataSource: 'url' attribute is not specified and no embedded datasource could be configured.
- WARNING rally.common.broker [-] Failed to consume a task from the queue: The resource could not be found. (HTTP 404)
- Failed to execute request because the App-Domain could not be created
- webpack打包遇到locals[0] does not appear to be a `module` object with Hot Module replacement API enabled. You should disable react-transform-hmr in production by using `env` section in Babel configuration
- The security settings could not be applied to the database because the connection has failed w
- Failed to connect the specified server.Server library could not be loaded
- kafka调试中遇到Connection to node -1 could not be established. Broker may not be available.
- Failed to execute request because the App-Domain could not be created.
- javax.websocket.DeploymentException: Multiple Endpoints may not be deployed to the path