启动离子项目时出错 [英] Error starting ionic project

查看:79
本文介绍了启动离子项目时出错的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经安装了 Node.js ,以一个 ionic 项目开始. 我还使用以下命令安装了 ionic cordova :

I have installed Node.js to start with an ionic project. I have also installed ionic and cordova using the commands below:

npm install ionic -g 
npm install cordova -g

我正在使用以下命令创建一个 ionic 项目:

I am using the command below to create an ionic project:

ionic start myApp blank

我收到以下错误:

D:\IonicWork>ionic start myApp blank
Creating Ionic app in folder D:\IonicWork\myApp based on blank project
Downloading: https://github.com/driftyco/ionic-app-base/archive/master.zip
Error with start Error: connect ETIMEDOUT 192.30.253.121:443
    at Object.exports._errnoException (util.js:1036:11)
    at exports._exceptionWithHostPort (util.js:1059:20)
    at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1080:14)
Error Initializing app: Error: connect ETIMEDOUT 192.30.253.121:443
 Error: connect ETIMEDOUT 192.30.253.121:443
    at Object.exports._errnoException (util.js:1036:11)
    at exports._exceptionWithHostPort (util.js:1059:20)
    at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1080:14)
Caught exception:
Error: connect ETIMEDOUT 192.30.253.121:443
    at Object.exports._errnoException (util.js:1036:11)
    at exports._exceptionWithHostPort (util.js:1059:20)
    at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1080:14)

让我们知道的想法? https://github.com/driftyco/ionic-cli/issues

Mind letting us know? https://github.com/driftyco/ionic-cli/issues

请提出建议.

谢谢, 马里尼

推荐答案

如果您在公司网络中,则很可能在公司Web代理后面.有很多解决方案.

If you are on a company network, you are most probably behind a corporate web proxy. There are plenty of solution out there.

首先,您需要基于从公司IT部门获得的代理添加http_proxyhttps_proxy环境变量.

For a headstart, you need to add http_proxy and https_proxy environment variables based on the proxy you got from your company IT department.

在管理员模式下打开节点命令提示符,然后运行以下命令.之后,关闭并重新启动节点命令提示符,然后尝试再次运行ionic start.

Open your node command prompt in administrator mode and run following command. After that, close and restart your node command prompt and try to run ionic start again.

npm config set proxy http://proxy.company.com:8080
npm config set https-proxy http://proxy.company.com:8080

这篇关于启动离子项目时出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆