简体   繁体   中英

Error: connect ECONNREFUSED in Ionic

I got one error when I try to start new app in ionic.i'm using proxy to access to internet.my IP address is 172.16.30.20 and port number is 8080

D:\MyApp>ionic start diary1 tabs
Creating Ionic app in folder D:\MyApp\diary1 based on tabs project
Downloading: https://github.com/driftyco/ionic-app-base/archive/master.zip
Error Initializing app:  Error: connect ECONNREFUSED
    at exports._errnoException (util.js:746:11)
    at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1010:19)

Error: connect ECONNREFUSED
    at exports._errnoException (util.js:746:11)
    at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1010:19)

connect ECONNREFUSED (CLI v1.6.1)

Your system information:

Cordova CLI: 5.1.1
Ionic CLI Version: 1.6.1
Ionic App Lib Version: 0.3.3
OS: Windows 7 SP1
Node Version: v0.12.7

This is what helped me solve it.

http://manjeshpv.com/ionic-start-behind-the-proxy-on-windows-commandline/

I also work behind a proxy and want to use Cmder to do the job, so this worked well. The solution is quite out-dated as the request.js changed but just insert that before the part:

 if(!self.hasOwnProperty('proxy')) {
self.proxy = getProxyFromURI(self.uri)

}

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM