Ionic 2.2.2 can not start a new app?

ionic start ttt --v2


Dependency warning - for the CLI to run correctly,
it is highly recommended to install/upgrade the following:

Install ios-sim to deploy iOS applications.npm install -g ios-sim (may require sudo)
Install ios-deploy to deploy iOS applications to devices. npm install -g ios-deploy (may require sudo)


Creating an Ionic 2.x app in /Users/user/tmp/ttt based on the tabs template.

Downloading: https://github.com/driftyco/ionic2-app-base/archive/master.zip
Error with start Error: tunneling socket could not be established, cause=connect EHOSTUNREACH 0.0.31.64:80 - Local (ipadress:53903)
at ClientRequest.onError (/usr/local/lib/node_modules/ionic/node_modules/tunnel-agent/index.js:176:17)
at ClientRequest.g (events.js:291:16)
at emitOne (events.js:96:13)
at ClientRequest.emit (events.js:188:7)
at Socket.socketErrorListener (_http_client.js:309:9)
at emitOne (events.js:96:13)
at Socket.emit (events.js:188:7)
at emitErrorNT (net.js:1281:8)
at _combinedTickCallback (internal/process/next_tick.js:80:11)
at process._tickCallback (internal/process/next_tick.js:104:9)
Error Initializing app: Error: tunneling socket could not be established, cause=connect EHOSTUNREACH 0.0.31.64:80 - Local (ipaddress:53903)
Error: tunneling socket could not be established, cause=connect EHOSTUNREACH 0.0.31.64:80 - Local (ipaddress:53903)
at ClientRequest.onError (/usr/local/lib/node_modules/ionic/node_modules/tunnel-agent/index.js:176:17)
at ClientRequest.g (events.js:291:16)
at emitOne (events.js:96:13)
at ClientRequest.emit (events.js:188:7)
at Socket.socketErrorListener (_http_client.js:309:9)
at emitOne (events.js:96:13)
at Socket.emit (events.js:188:7)
at emitErrorNT (net.js:1281:8)
at _combinedTickCallback (internal/process/next_tick.js:80:11)
at process._tickCallback (internal/process/next_tick.js:104:9)

Cordova CLI: 6.5.0
Ionic CLI Version: 2.2.2
Ionic App Lib Version: 2.2.1
ios-deploy version: Not installed
ios-sim version: Not installed
OS: macOS Sierra
Node Version: v6.10.2

Anyone knows what happened exactly???

npm and node and cordova and git works fine, means can install plugin or clone codes.

Someone’s broken here.
Firewall?
Same error message on every try?

Yes same error every try.

I am working behind a proxy, but as I said, npm/git works fine, PROXY has already set.

The strangest thing is the 0.0.31.64, what’s this address anyway?
And the error is EHOSTUNREACH because of it I think.

And even after the whole uninstall and remove all files and install again, I still get this error.

Download it from GitHub without the CLI

Then where should I extract it to? How to use it to create a new app?

I already download it when try git.

Just run npm install and you should be able to use it.

Download this: https://github.com/driftyco/ionic2-app-base and this: https://github.com/driftyco/ionic2-starter-blank

Extract both into the same folder

Thank you~

Let me have a try~~

Hi LoLStats,

What’s else need I do after npm i?

I run ionic serve but failed, with message here:

ionic-app-script task: "serve"
Error: Cannot read property ‘content’ of undefined
at BuildError.Error (native)

Did you installed iOnic global? If yes try to run npm run-script build and then ionic serve

It’s ok now, thank you LoLStats!

And so it’s what the ionic start did for us:
1 download app base
2 download starter codes
3 npm install

And ionic serve will run npm run-script build for us and then start a web service.

Thank you again LoLStats, you are really expert on this~~~

1 Like