Angular2 / Ionic2:undefined不是对象(评估'Pst.Base64.decode')

时间:2016-10-15 03:50:26

标签: angular ionic2

为ios构建我的Ionic2 RC0时出现以下错误,我不知道可能是什么。这是从Beta11 Ionic2升级到RC0后发生的。 (使用ng2 final)

0     949421   error    EXCEPTION: undefined is not an object (evaluating 'Pst.Base64.decode')
1     949422   error    ORIGINAL STACKTRACE:
2     949423   error    urlBase64Decode@http://192.168.2.101:8100/build/main.js:35:29599
decodeToken@http://192.168.2.101:8100/build/main.js:35:29749
getTokenExpirationDate@http://192.168.2.101:8100/build/main.js:35:29901
isTokenExpired@http://192.168.2.101:8100/build/main.js:35:30067
Za@http://192.168.2.101:8100/build/main.js:5:20792
authenticated@http://192.168.2.101:8100/build/main.js:36:25985
t@http://192.168.2.101:8100/build/main.js:36:25881
get@http://192.168.2.101:8100/build/main.js:65:5471
getInternal@http://192.168.2.101:8100/build/main.js:65:11288
get@http://192.168.2.101:8100/build/main.js:8:27336
get@http://192.168.2.101:8100/build/main.js:9:15630
createInternal@http://192.168.2.101:8100/build/main.js:41:5332
create@http://192.168.2.101:8100/build/main.js:9:17649
create@http://192.168.2.101:8100/build/main.js:8:2861
createComponent@http://192.168.2.101:8100/build/main.js:7:28613
ngOnInit@http://192.168.2.101:8100/build/main.js:17:30881
detectChangesInternal@http://192.168.2.101:8100/build/main.js:39:3906
detectChanges@http://192.168.2.101:8100/build/main.js:9:20601
detectChanges@http://192.168.2.101:8100/build/main.js:9:356
http://192.168.2.101:8100/build/main.js:8:25424
forEach@[native code]
tick@http://192.168.2.101:8100/build/main.js:8:25389
_loadComponent@http://192.168.2.101:8100/build/main.js:8:24901
bootstrap@http://192.168.2.101:8100/build/main.js:8:24669
http://192.168.2.101:8100/build/main.js:8:22803
forEach@[native code]
_moduleDoBootstrap@http://192.168.2.101:8100/build/main.js:8:22772
http://192.168.2.101:8100/build/main.js:8:22109
invoke@http://192.168.2.101:8100/build/polyfills.js:3:13405
onInvoke@http://192.168.2.101:8100/build/main.js:8:15166
invoke@http://192.168.2.101:8100/build/polyfills.js:3:13359
run@http://192.168.2.101:8100/build/polyfills.js:3:10793
http://192.168.2.101:8100/build/polyfills.js:3:8892
invokeTask@http://192.168.2.101:8100/build/polyfills.js:3:14034
onInvokeTask@http://192.168.2.101:8100/build/main.js:8:15070
invokeTask@http://192.168.2.101:8100/build/polyfills.js:3:13977
runTask@http://192.168.2.101:8100/build/polyfills.js:3:11399
i@http://192.168.2.101:8100/build/polyfills.js:3:8013
u@http://192.168.2.101:8100/build/polyfills.js:2:7864
http://192.168.2.101:8100/build/polyfills.js:2:7988
r@http://192.168.2.101:8100/build/polyfills.js:2:6435
3     949425   error    EXCEPTION: undefined is not an object (evaluating 'Pst.Base64.decode')
4     949425   error    ORIGINAL STACKTRACE:
5     949426   error    urlBase64Decode@http://192.168.2.101:8100/build/main.js:35:29599
decodeToken@http://192.168.2.101:8100/build/main.js:35:29749
getTokenExpirationDate@http://192.168.2.101:8100/build/main.js:35:29901
isTokenExpired@http://192.168.2.101:8100/build/main.js:35:30067
Za@http://192.168.2.101:8100/build/main.js:5:20792
authenticated@http://192.168.2.101:8100/build/main.js:36:25985
t@http://192.168.2.101:8100/build/main.js:36:25881
get@http://192.168.2.101:8100/build/main.js:65:5471
getInternal@http://192.168.2.101:8100/build/main.js:65:11288
get@http://192.168.2.101:8100/build/main.js:8:27336
get@http://192.168.2.101:8100/build/main.js:9:15630
createInternal@http://192.168.2.101:8100/build/main.js:41:5332
create@http://192.168.2.101:8100/build/main.js:9:17649
create@http://192.168.2.101:8100/build/main.js:8:2861
createComponent@http://192.168.2.101:8100/build/main.js:7:28613
ngOnInit@http://192.168.2.101:8100/build/main.js:17:30881
detectChangesInternal@http://192.168.2.101:8100/build/main.js:39:3906
detectChanges@http://192.168.2.101:8100/build/main.js:9:20601
detectChanges@http://192.168.2.101:8100/build/main.js:9:356
http://192.168.2.101:8100/build/main.js:8:25424
forEach@[native code]
tick@http://192.168.2.101:8100/build/main.js:8:25389
http://192.168.2.101:8100/build/main.js:8:23896
invoke@http://192.168.2.101:8100/build/polyfills.js:3:13405
onInvoke@http://192.168.2.101:8100/build/main.js:8:15166
invoke@http://192.168.2.101:8100/build/polyfills.js:3:13359
run@http://192.168.2.101:8100/build/polyfills.js:3:10793
runInner@http://192.168.2.101:8100/build/main.js:8:15568
run@http://192.168.2.101:8100/build/main.js:8:17928
next@http://192.168.2.101:8100/build/main.js:8:23878
http://192.168.2.101:8100/build/main.js:8:13893
__tryOrUnsub@http://192.168.2.101:8100/build/main.js:8:8740
next@http://192.168.2.101:8100/build/main.js:8:8094
_next@http://192.168.2.101:8100/build/main.js:8:7413
next@http://192.168.2.101:8100/build/main.js:8:7085
next@http://192.168.2.101:8100/build/main.js:8:11865
emit@http://192.168.2.101:8100/build/main.js:8:13667
_checkStable@http://192.168.2.101:8100/build/main.js:8:16825
setMicrotask@http://192.168.2.101:8100/build/main.js:8:16237
onHasTask@http://192.168.2.101:8100/build/main.js:8:15287
hasTask@http://192.168.2.101:8100/build/polyfills.js:3:14535
_updateTaskCount@http://192.168.2.101:8100/build/polyfills.js:3:14841
invokeTask@http://192.168.2.101:8100/build/polyfills.js:3:14131
runTask@http://192.168.2.101:8100/build/polyfills.js:3:11399
i@http://192.168.2.101:8100/build/polyfills.js:3:8013
u@http://192.168.2.101:8100/build/polyfills.js:2:7864
http://192.168.2.101:8100/build/polyfills.js:2:7988
r@http://192.168.2.101:8100/build/polyfills.js:2:6435
6     949427   error    [object Object]

1 个答案:

答案 0 :(得分:0)

结果表明angular-jwt没有更新其库以使用汇总。为了缓解我们需要安装base64类型并定义rollup.config.js的commonjs部分,如下所述:

read about it in MDN