2016-06-01 73 views
0

我正在嘗試執行推送通知離子框架v1無法讀取undefined屬性'statusCode'

這就是爲什麼開始我下載我在哪裏得到「的StatusCode」錯誤空白模板。

C:\Users\sif-\Desktop\vConnect_31_5_16>ionic start vConnectPro blank 
Creating Ionic app in folder C:\Users\sif-\Desktop\vConnect_31_5_16\vConnectPro 
based on blank project 
Downloading: https://github.com/driftyco/ionic-app-base/archive/master.zip 
[=============================] 100% 0.0s 
Downloading: https://github.com/driftyco/ionic-starter-blank/archive/master.zip 
[=============================] 100% 0.0s 
Updated the hooks directory to have execute permissions 
Update Config.xml 
Initializing cordova project 

? ♫ ? ♫ Your Ionic app is ready to go! ? ♫ ? ♫ 

Make sure to cd into your new app directory: 
    cd vConnectPro 

To run your app in the browser (great for initial development): 
    ionic serve 

To run on iOS: 
    ionic run ios 

To run on Android: 
    ionic run android 

To test your app on a device easily, try Ionic View: 
    http://view.ionic.io 

New! Add push notifications, live app updates, and more with Ionic Platform! 
    https://apps.ionic.io/signup 

C:\Users\sif-\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\sif-\AppData\Roaming\npm\node_modules\ionic\l 
ib\cli.js:474:55) 
    at self.callback (C:\Users\sif-\AppData\Roaming\npm\node_modules\ionic\node_ 
modules\request\request.js:373:22) 
    at emitOne (events.js:77:13) 
    at Request.emit (events.js:169:7) 
    at Request.onRequestError (C:\Users\sif-\AppData\Roaming\npm\node_modules\io 
nic\node_modules\request\request.js:971:8) 
    at emitOne (events.js:77:13) 
    at ClientRequest.emit (events.js:169:7) 
    at Socket.socketErrorListener (_http_client.js:256:9) 
    at emitOne (events.js:77:13) 
    at Socket.emit (events.js:169:7) 

起初我忽略了這個,因爲空白的應用程序運行良好,但是實施所有必要的

代碼推送通知後,我得到了有關「的StatusCode」再次錯誤。現在對我來說這是一個阻擋者。

我該如何解決這個錯誤?

回答

1

這是必須容易

這個問題產生的代理問題,當你是代理之後

確保您使用的是直接連接到互聯網

+0

我也越來越PC或筆記本電腦這個錯誤。有沒有辦法在代理之後使用它?我已經設置了npm config set proxy變量,但是我應該在哪裏設置代理以避免此錯誤?謝謝 – Enrique

相關問題