Rigel Rigel - 5 months ago 53
AngularJS Question

Cannot read property 'statusCode' of undefined at Request._callback

WHILE CREATING NEW IONIC APP I AM GETTING THIS ERROR

C:\Users\orcilia49\AppData\Roaming\npm\node_modules\ionic\lib\cli.js:474
process.stdout.write('Unable to fetch', err, res.statusCode);
TypeError: Cannot read property 'statusCode' of undefined
at Request._callback (C:\Users\orcilia49\AppData\Roaming\npm\node_modules\ionic\lib\cli.js:474:55)
at self.callback (C:\Users\orcilia49\AppData\Roaming\npm\node_modules\ionic\node_modules\request\request.js:373:22)
at emitOne (events.js:96:13)
at Request.emit (events.js:188:7)
at Request.onRequestError (C:\Users\orcilia49\AppData\Roaming\npm\node_modules\ionic\node_modules\request\request.js:971:8)
at emitOne (events.js:96:13)
at ClientRequest.emit (events.js:188:7)
at Socket.socketErrorListener (_http_client.js:306:9)
at emitOne (events.js:96:13)
at Socket.emit (events.js:188:7)

Answer

This most likely a proxy issue.

Make sure that you are using pc / laptop with direct internet connection.

I hope this solves your issue.

If you are using windows and using cmd to run ionic app then use this command to set your proxy

set http_proxy=http://[your proxy servers IP : your proxy servers port]