安装离子错误:无法建立隧道套接字,statusCode = 302

时间:2017-02-06 12:51:03

标签: angularjs express ionic-framework

您好我正在使用Ionic,我想使用命令

安装离子
ionic start --v myapp tabs

但我收到错误

Creating Ionic app in folder C:\Users\Ahmad\myapp based on tabs project
Downloading: https://github.com/driftyco/ionic2-app-base/archive/master.zip
Error with start Error: tunneling socket could not be established, statusCode=30
2
    at ClientRequest.onConnect (C:\Users\Ahmad\AppData\Roaming\npm\node_modules\
ionic\node_modules\ionic-app-lib\node_modules\request\node_modules\tunnel-agent\
index.js:165:19)
    at ClientRequest.g (events.js:260:16)
    at emitThree (events.js:97:13)
    at ClientRequest.emit (events.js:175:7)
    at Socket.socketOnData (_http_client.js:352:11)
    at emitOne (events.js:77:13)
    at Socket.emit (events.js:169:7)
    at readableAddChunk (_stream_readable.js:153:18)
    at Socket.Readable.push (_stream_readable.js:111:10)
    at TCP.onread (net.js:536:20)
Error Initializing app: Error: tunneling socket could not be established, status
Code=302
 Error: tunneling socket could not be established, statusCode=302
    at ClientRequest.onConnect (C:\Users\Ahmad\AppData\Roaming\npm\node_modules\
ionic\node_modules\ionic-app-lib\node_modules\request\node_modules\tunnel-agent\
index.js:165:19)
    at ClientRequest.g (events.js:260:16)
    at emitThree (events.js:97:13)
    at ClientRequest.emit (events.js:175:7)
    at Socket.socketOnData (_http_client.js:352:11)
    at emitOne (events.js:77:13)
    at Socket.emit (events.js:169:7)
    at readableAddChunk (_stream_readable.js:153:18)
    at Socket.Readable.push (_stream_readable.js:111:10)
    at TCP.onread (net.js:536:20)

我做了R& D但没有得到有用的解决方案如何解决这个问题。

1 个答案:

答案 0 :(得分:1)

我解决了这个问题。我正在使用窗口8。我只是找到了

环境变量https_proxy并删除此变量,然后问题是

解决