ionic-cli icon indicating copy to clipboard operation
ionic-cli copied to clipboard

Error: socket hang up

Open hmuschett opened this issue 9 years ago • 12 comments

$ ionic start MyIonicProject tutorial [INFO] Fetching app base (https://github.com/ionic-team/ionic2-app-base/archive/master.tar.gz) × Downloading - failed! Error: socket hang up at TLSSocket.onHangUp (_tls_wrap.js:1120:19) at Object.onceWrapper (events.js:293:19) at emitNone (events.js:91:20) at TLSSocket.emit (events.js:188:7) at endReadableNT (_stream_readable.js:975:12) at _combinedTickCallback (internal/process/next_tick.js:80:11) at process._tickCallback (internal/process/next_tick.js:104:9)

hmuschett avatar Sep 25 '17 20:09 hmuschett

@hmuschett Please fill out the issue template.

Is this a recurring issue?

imhoffd avatar Sep 25 '17 23:09 imhoffd

@dwieeb Yes, I've been trying to fix it for days and nothing.

hmuschett avatar Sep 26 '17 14:09 hmuschett

@hmuschett Are you behind a firewall? Did you need to configure npm for a proxy?

imhoffd avatar Sep 26 '17 15:09 imhoffd

@dwieeb yes i am behind a firewall but I have npm configured and it works with other packages like AngularCLI

hmuschett avatar Sep 27 '17 13:09 hmuschett

@hmuschett Please see the docs for Proxy Configuration: https://ionicframework.com/docs/cli/configuring.html#using-a-proxy

Let me know if you have any more issues.

imhoffd avatar Sep 27 '17 14:09 imhoffd

I have configured everything and it does not work

$ ionic info [WARN] You are not in an Ionic project directory. Project context may be missing.

cli packages: (C:\Users\hmuschett\AppData\Roaming\npm\node_modules)

@ionic/cli-plugin-proxy : 1.4.9
@ionic/cli-utils        : 1.10.2
ionic (Ionic CLI)       : 3.10.3

System:

Node : v7.10.0
npm  : 4.2.0
OS   : Windows 7

HTTPS_PROXY=https://hmuschett:[email protected]:3128 HTTP_PROXY=http://hmuschett:[email protected]:3128

hmuschett avatar Sep 27 '17 20:09 hmuschett

Can you send the full output of the command that doesn't work? Please add --verbose to enable debug logging.

imhoffd avatar Sep 28 '17 23:09 imhoffd

+1 sudo ionic start myIonicApp tabs [INFO] Fetching app base (https://github.com/ionic-team/ionic2-app-base/archive/master.tar.gz) ✖ Downloading - failed! Error: socket hang up at TLSSocket.onHangUp (_tls_wrap.js:1124:19) at TLSSocket.g (events.js:292:16) at emitNone (events.js:91:20) at TLSSocket.emit (events.js:185:7) at endReadableNT (_stream_readable.js:974:12) at _combinedTickCallback (internal/process/next_tick.js:80:11) at process._tickCallback (internal/process/next_tick.js:104:9)

nirbhay94 avatar Sep 29 '17 06:09 nirbhay94

@dwieeb $ ionic start mytest tutorial √ Creating directory .\mytest - done! [INFO] Fetching app base (https://github.com/ionic-team/ionic2-app-base/archive/master.tar.gz) × Downloading - failed! Error: socket hang up at TLSSocket.onHangUp (_tls_wrap.js:1120:19) at Object.onceWrapper (events.js:293:19) at emitNone (events.js:91:20) at TLSSocket.emit (events.js:188:7) at endReadableNT (_stream_readable.js:975:12) at _combinedTickCallback (internal/process/next_tick.js:80:11) at process._tickCallback (internal/process/next_tick.js:104:

hmuschett avatar Sep 29 '17 14:09 hmuschett

@Nirbhay94 @hmuschett Please run it with the --verbose flag.

Run this command: ionic start mytest tutorial --verbose

imhoffd avatar Oct 09 '17 14:10 imhoffd

C:\Users\U>ionic start mytest tutorial --verbose [DEBUG] CLI flags: { interactive: true, confirm: false } [DEBUG] { cwd: 'C:\Users\U', local: false, binPath: 'C:\Users\U\AppData\Roaming\npm\node_modules\ion onic', libPath: 'C:\Users\U\AppData\Roaming\npm\node_modules\ion index.js' } [DEBUG] Loading global plugin @ionic/cli-plugin-proxy ? Would you like to integrate your new app with Cordova to target nati d Android? Yes [DEBUG] globalDeps=cordova V Creating directory .\mytest - done! [INFO] Fetching app base (https://github.com/ionic-team/ionic2-app-base/archive/master.t × Downloading - failed! Error: socket hang up [DEBUG] Error: socket hang up at TLSSocket.onHangUp (_tls_wrap.js:1130:19) at Object.onceWrapper (events.js:314:30) at emitNone (events.js:110:20) at TLSSocket.emit (events.js:207:7) at endReadableNT (_stream_readable.js:1047:12) at _combinedTickCallback (internal/process/next_tick.js:102:11 at process._tickCallback (internal/process/next_tick.js:161:9)

C:\Users\U>

jhbosch avatar Jun 22 '18 19:06 jhbosch

@jhbosch That CLI version is old. No one is giving me verbose output for the latest CLI version 😆

I'm closing this. This error probably means you have to configure proxy settings for the Ionic CLI. See the docs: https://ionicframework.com/docs/cli/configuring.html#using-a-proxy

If the socket hang up error is still occurring, please create a new issue and fill out the issue template.

imhoffd avatar Jun 22 '18 21:06 imhoffd