如何调试诸如此类的节点模块错误?
How to debug node module errors such as this one?
我刚刚被抛出这个丑陋的错误,我不太确定如何开始调试它?我查看了 zone.js 或下面其他文件中的代码,但乍一看并没有说明太多问题。
我从这段代码中了解到 Zone.js 中的 drainMicroTaskQueue 失败了。但是我从这里去哪里呢?如果不尝试详细理解这个 Zone.js,就无法真正确定它失败的原因。
关于如何继续调查此问题的任何提示?
ERROR Error: "Uncaught (in promise): TypeError: value is null
applyUpdate@webpack-internal:///./node_modules/@angular/common/esm2015/http.js:286:1
init/<@webpack-internal:///./node_modules/@angular/common/esm2015/http.js:246:51
init@webpack-internal:///./node_modules/@angular/common/esm2015/http.js:246:17
forEach@webpack-internal:///./node_modules/@angular/common/esm2015/http.js:323:9
handle/<@webpack-internal:///./node_modules/@angular/common/esm2015/http.js:1753:13
_trySubscribe@webpack-internal:///./node_modules/rxjs/_esm2015/Observable.js:175:20
subscribe@webpack-internal:///./node_modules/rxjs/_esm2015/Observable.js:163:88
call@webpack-internal:///./node_modules/rxjs/_esm2015/operators/tap.js:58:16
subscribe@webpack-internal:///./node_modules/rxjs/_esm2015/Observable.js:160:13
call@webpack-internal:///./node_modules/rxjs/_esm2015/operators/catchError.js:75:16
subscribe@webpack-internal:///./node_modules/rxjs/_esm2015/Observable.js:160:13
subscribeToResult@webpack-internal:///./node_modules/rxjs/_esm2015/util/subscribeToResult.js:31:20
_innerSub@webpack-internal:///./node_modules/rxjs/_esm2015/operators/mergeMap.js:124:18
_tryNext@webpack-internal:///./node_modules/rxjs/_esm2015/operators/mergeMap.js:121:9
_next@webpack-internal:///./node_modules/rxjs/_esm2015/operators/mergeMap.js:104:13
next@webpack-internal:///./node_modules/rxjs/_esm2015/Subscriber.js:87:13
_subscribe@webpack-internal:///./node_modules/rxjs/_esm2015/observable/ScalarObservable.js:43:13
_trySubscribe@webpack-internal:///./node_modules/rxjs/_esm2015/Observable.js:175:20
subscribe@webpack-internal:///./node_modules/rxjs/_esm2015/Observable.js:163:88
call@webpack-internal:///./node_modules/rxjs/_esm2015/operators/mergeMap.js:81:16
subscribe@webpack-internal:///./node_modules/rxjs/_esm2015/Observable.js:160:13
call@webpack-internal:///./node_modules/rxjs/_esm2015/operators/filter.js:55:16
subscribe@webpack-internal:///./node_modules/rxjs/_esm2015/Observable.js:160:13
call@webpack-internal:///./node_modules/rxjs/_esm2015/operators/map.js:51:16
subscribe@webpack-internal:///./node_modules/rxjs/_esm2015/Observable.js:160:13
setNavItem@webpack-internal:///./src/app/shared/components/app-header/app-header.component.ts:36:13
ngOnInit/<@webpack-internal:///./src/app/shared/components/app-header/app-header.component.ts:90:17
__tryOrUnsub@webpack-internal:///./node_modules/rxjs/_esm2015/Subscriber.js:234:13
next@webpack-internal:///./node_modules/rxjs/_esm2015/Subscriber.js:182:17
_next@webpack-internal:///./node_modules/rxjs/_esm2015/Subscriber.js:123:9
next@webpack-internal:///./node_modules/rxjs/_esm2015/Subscriber.js:87:13
next@webpack-internal:///./node_modules/rxjs/_esm2015/Subject.js:54:17
runNavigate/</<@webpack-internal:///./node_modules/@angular/router/esm2015/router.js:4678:40
ZoneDelegate.prototype.invoke@webpack-internal:///./node_modules/zone.js/dist/zone.js:388:17
onInvoke@webpack-internal:///./node_modules/@angular/core/esm2015/core.js:4201:24
ZoneDelegate.prototype.invoke@webpack-internal:///./node_modules/zone.js/dist/zone.js:387:17
Zone.prototype.run@webpack-internal:///./node_modules/zone.js/dist/zone.js:138:24
scheduleResolveOrReject/<@webpack-internal:///./node_modules/zone.js/dist/zone.js:858:52
ZoneDelegate.prototype.invokeTask@webpack-internal:///./node_modules/zone.js/dist/zone.js:421:17
onInvokeTask@webpack-internal:///./node_modules/@angular/core/esm2015/core.js:4192:24
ZoneDelegate.prototype.invokeTask@webpack-internal:///./node_modules/zone.js/dist/zone.js:420:17
Zone.prototype.runTask@webpack-internal:///./node_modules/zone.js/dist/zone.js:188:28
drainMicroTaskQueue@webpack-internal:///./node_modules/zone.js/dist/zone.js:595:25
"
resolvePromisewebpack-internal:///./node_modules/zone.js/dist/zone.js:809:31scheduleResolveOrRejectwebpack-internal:///./node_modules/zone.js/dist/zone.js:861:17invokeTaskwebpack-internal:///./node_modules/zone.js/dist/zone.js:421:17node_modulesangular/core/esm2015/core.js:4192:24invokeTaskwebpack-internal:///./node_modules/zone.js/dist/zone.js:420:17runTaskwebpack-internal:///./node_modules/zone.js/dist/zone.js:188:28drainMicroTaskQueuewebpack-internal:///./node_modules/zone.js/dist/zone.js:595:25
有关此错误何时发生的一些上下文会有所帮助,它是在您单击按钮或锚点时发生,还是在更改路线时发生 e.t.c...
问题是用户未登录并且订阅获取 JSON 文件失败。在用户登录之前,存在阻止检索该数据的安全限制。
一旦用户登录,错误就会消失。
我刚刚被抛出这个丑陋的错误,我不太确定如何开始调试它?我查看了 zone.js 或下面其他文件中的代码,但乍一看并没有说明太多问题。
我从这段代码中了解到 Zone.js 中的 drainMicroTaskQueue 失败了。但是我从这里去哪里呢?如果不尝试详细理解这个 Zone.js,就无法真正确定它失败的原因。
关于如何继续调查此问题的任何提示?
ERROR Error: "Uncaught (in promise): TypeError: value is null
applyUpdate@webpack-internal:///./node_modules/@angular/common/esm2015/http.js:286:1
init/<@webpack-internal:///./node_modules/@angular/common/esm2015/http.js:246:51
init@webpack-internal:///./node_modules/@angular/common/esm2015/http.js:246:17
forEach@webpack-internal:///./node_modules/@angular/common/esm2015/http.js:323:9
handle/<@webpack-internal:///./node_modules/@angular/common/esm2015/http.js:1753:13
_trySubscribe@webpack-internal:///./node_modules/rxjs/_esm2015/Observable.js:175:20
subscribe@webpack-internal:///./node_modules/rxjs/_esm2015/Observable.js:163:88
call@webpack-internal:///./node_modules/rxjs/_esm2015/operators/tap.js:58:16
subscribe@webpack-internal:///./node_modules/rxjs/_esm2015/Observable.js:160:13
call@webpack-internal:///./node_modules/rxjs/_esm2015/operators/catchError.js:75:16
subscribe@webpack-internal:///./node_modules/rxjs/_esm2015/Observable.js:160:13
subscribeToResult@webpack-internal:///./node_modules/rxjs/_esm2015/util/subscribeToResult.js:31:20
_innerSub@webpack-internal:///./node_modules/rxjs/_esm2015/operators/mergeMap.js:124:18
_tryNext@webpack-internal:///./node_modules/rxjs/_esm2015/operators/mergeMap.js:121:9
_next@webpack-internal:///./node_modules/rxjs/_esm2015/operators/mergeMap.js:104:13
next@webpack-internal:///./node_modules/rxjs/_esm2015/Subscriber.js:87:13
_subscribe@webpack-internal:///./node_modules/rxjs/_esm2015/observable/ScalarObservable.js:43:13
_trySubscribe@webpack-internal:///./node_modules/rxjs/_esm2015/Observable.js:175:20
subscribe@webpack-internal:///./node_modules/rxjs/_esm2015/Observable.js:163:88
call@webpack-internal:///./node_modules/rxjs/_esm2015/operators/mergeMap.js:81:16
subscribe@webpack-internal:///./node_modules/rxjs/_esm2015/Observable.js:160:13
call@webpack-internal:///./node_modules/rxjs/_esm2015/operators/filter.js:55:16
subscribe@webpack-internal:///./node_modules/rxjs/_esm2015/Observable.js:160:13
call@webpack-internal:///./node_modules/rxjs/_esm2015/operators/map.js:51:16
subscribe@webpack-internal:///./node_modules/rxjs/_esm2015/Observable.js:160:13
setNavItem@webpack-internal:///./src/app/shared/components/app-header/app-header.component.ts:36:13
ngOnInit/<@webpack-internal:///./src/app/shared/components/app-header/app-header.component.ts:90:17
__tryOrUnsub@webpack-internal:///./node_modules/rxjs/_esm2015/Subscriber.js:234:13
next@webpack-internal:///./node_modules/rxjs/_esm2015/Subscriber.js:182:17
_next@webpack-internal:///./node_modules/rxjs/_esm2015/Subscriber.js:123:9
next@webpack-internal:///./node_modules/rxjs/_esm2015/Subscriber.js:87:13
next@webpack-internal:///./node_modules/rxjs/_esm2015/Subject.js:54:17
runNavigate/</<@webpack-internal:///./node_modules/@angular/router/esm2015/router.js:4678:40
ZoneDelegate.prototype.invoke@webpack-internal:///./node_modules/zone.js/dist/zone.js:388:17
onInvoke@webpack-internal:///./node_modules/@angular/core/esm2015/core.js:4201:24
ZoneDelegate.prototype.invoke@webpack-internal:///./node_modules/zone.js/dist/zone.js:387:17
Zone.prototype.run@webpack-internal:///./node_modules/zone.js/dist/zone.js:138:24
scheduleResolveOrReject/<@webpack-internal:///./node_modules/zone.js/dist/zone.js:858:52
ZoneDelegate.prototype.invokeTask@webpack-internal:///./node_modules/zone.js/dist/zone.js:421:17
onInvokeTask@webpack-internal:///./node_modules/@angular/core/esm2015/core.js:4192:24
ZoneDelegate.prototype.invokeTask@webpack-internal:///./node_modules/zone.js/dist/zone.js:420:17
Zone.prototype.runTask@webpack-internal:///./node_modules/zone.js/dist/zone.js:188:28
drainMicroTaskQueue@webpack-internal:///./node_modules/zone.js/dist/zone.js:595:25
"
resolvePromisewebpack-internal:///./node_modules/zone.js/dist/zone.js:809:31scheduleResolveOrRejectwebpack-internal:///./node_modules/zone.js/dist/zone.js:861:17invokeTaskwebpack-internal:///./node_modules/zone.js/dist/zone.js:421:17node_modulesangular/core/esm2015/core.js:4192:24invokeTaskwebpack-internal:///./node_modules/zone.js/dist/zone.js:420:17runTaskwebpack-internal:///./node_modules/zone.js/dist/zone.js:188:28drainMicroTaskQueuewebpack-internal:///./node_modules/zone.js/dist/zone.js:595:25
有关此错误何时发生的一些上下文会有所帮助,它是在您单击按钮或锚点时发生,还是在更改路线时发生 e.t.c...
问题是用户未登录并且订阅获取 JSON 文件失败。在用户登录之前,存在阻止检索该数据的安全限制。
一旦用户登录,错误就会消失。