Failing to initialize new Ionic 2 App


#1

All of a sudden, generating Ionic 2 App is misbehaving. Its giving the error below

Error: socket hang up
at TLSSocket.onHangUp (_tls_wrap.js:1136: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:1059:12)
at _combinedTickCallback (internal/process/next_tick.js:138:11)
at process._tickCallback (internal/process/next_tick.js:180:9)


#2

Go to C:\Users\Your Name.ionic and see if you have a config.json file in that folder that’s either empty or full of null values. Delete it.