如何使用webpack调试Angular 2?

编程入门 行业动态 更新时间:2024-10-22 23:06:38
本文介绍了如何使用webpack调试Angular 2?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

给出以下错误:

例外:未捕获(承诺):TypeError:无法设置仅具有吸气剂的[object Object]的属性堆栈TypeError:无法设置只有吸气剂的[object Object]的属性堆栈

我得到的堆栈跟踪非常大,我不知道哪个打字稿文件令人窒息,它具有只读属性.有什么方法可以告诉我它要设置的仅具有吸气剂的属性吗?

The stack trace that I get is huge and I have no clue which typescript file is choking that has a read only property. Is there a way that will tell me which property it is trying to set that has only a getter?

一种快速而肮脏的解决方案是逐个删除代码,直到它起作用为止.我可以分辨出是哪个代码范围阻塞了,那里出现了什么问题.但是,如果从长远来看,代码突然中断了,那么他的解决方案就不是理想的选择了,而如果不查看版本历史,我将不知道是什么导致了中断.

A quick and dirty solution is to one by one remove code until it works. I would be able to tell which scope of the code it was choking and what would be the problem there. However, if in the long run the code suddenly breaks, then his kind of solution is not ideal and I would have no idea what broke it without looking at the version histories.

有没有可以帮助我解决这个问题的工具?

Is there a tool that would help me with this?

错误:未捕获(承诺):TypeError:无法设置仅具有吸气剂的[object Object]的属性堆栈TypeError:无法设置只有吸气剂的[object Object]的属性堆栈在assignAll(localhost:3000/polyfills.bundle.js:16015:29)在ViewWrappedError.ZoneAwareError(localhost:3000/polyfills.bundle.js:16086:16)在ViewWrappedError.BaseError上[作为构造函数](localhost:3000/main.bundle.js:5256:16)在ViewWrappedError.WrappedError上[作为构造函数](localhost:3000/main.bundle.js:5318:16)在新的ViewWrappedError(localhost:3000/main.bundle.js:57044:16)在CompiledTemplate.proxyViewClass.DebugAppView._rethrowWithContext(localhost:3000/main.bundle.js:79673:23)在CompiledTemplate.proxyViewClass.DebugAppView.detectChanges(localhost:3000/main.bundle.js:79646:18)在CompiledTemplate.proxyViewClass.AppView.internalDetectChanges(localhost:3000/main.bundle.js:79433:18)在CompiledTemplate.proxyViewClass.View_ReportsComponent_Host0.detectChangesInternal(/ReportsModule/ReportsComponent/host.ngfactory.js:35:19)在CompiledTemplate.proxyViewClass.AppView.detectChanges(localhost:3000/main.bundle.js:79448:14)在CompiledTemplate.proxyViewClass.DebugAppView.detectChanges(localhost:3000/main.bundle.js:79643:44)在ViewRef_.detectChanges(localhost:3000/main.bundle.js:57990:20)在RouterOutlet.activate(localhost:3000/main.bundle.js:63236:42)在ActivateRoutes.placeComponentIntoOutlet(localhost:3000/main.bundle.js:21937:16)在ActivateRoutes.activateRoutes(localhost:3000/main.bundle.js:21904:26)在localhost:3000/main.bundle.js:21840:58在Array.forEach(本机)在ActivateRoutes.activateChildRoutes(localhost:3000/main.bundle.js:21840:29)在ActivateRoutes.activateRoutes(localhost:3000/main.bundle.js:21910:22)在localhost:3000/main.bundle.js:21840:58在Array.forEach(本机)在ActivateRoutes.activateChildRoutes(localhost:3000/main.bundle.js:21840:29)在ActivateRoutes.activate(localhost:3000/main.bundle.js:21814:14)在localhost:3000/main.bundle.js:21382:22在SafeSubscriber._next(localhost:3000/main.bundle.js:4169:25)在SafeSubscriber .__ tryOrUnsub(localhost:3000/main.bundle.js:6028:16)在SafeSubscriber.next(localhost:3000/main.bundle.js:5977:22)在Subscriber._next(localhost:3000/main.bundle.js:5930:26)在Subscriber.next(localhost:3000/main.bundle.js:5894:18)在MapSubscriber._next(localhost:3000/main.bundle.js:23024:26)在MapSubscriber.Subscriber.next(localhost:3000/main.bundle.js:5894:18)在MergeMapSubscriber.notifyNext(localhost:3000/main.bundle.js:22890:30)在InnerSubscriber._next(localhost:3000/main.bundle.js:85350:21)在InnerSubscriber.Subscriber.next(localhost:3000/main.bundle.js:5894:18)在MapSubscriber._next(localhost:3000/main.bundle.js:23024:26)在MapSubscriber.Subscriber.next(localhost:3000/main.bundle.js:5894:18)在ReduceSubscriber._complete(localhost:3000/main.bundle.js:86357:30)在ReduceSubscriber.Subscriberplete(localhost:3000/main.bundle.js:5919:18)在MergeMapSubscriber._complete(localhost:3000/main.bundle.js:22882:30)在MergeMapSubscriber.Subscriberplete(localhost:3000/main.bundle.js:5919:18)在ArrayObservable._subscribe(localhost:3000/main.bundle.js:66973:24)在ArrayObservable.Observable.subscribe(localhost:3000/main.bundle.js:4131:27)在MergeMapOperator.call(localhost:3000/main.bundle.js:22832:23)在Observable.subscribe(localhost:3000/main.bundle.js:4128:22)在ReduceOperator.call(localhost:3000/main.bundle.js:86316:23)在Observable.subscribe(localhost:3000/main.bundle.js:4128:22)在MapOperator.call(localhost:3000/main.bundle.js:22995:23)在Observable.subscribe(localhost:3000/main.bundle.js:4128:22)在Object.subscribeToResult(localhost:3000/main.bundle.js:46412:27)在MergeMapSubscriber._innerSub(localhost:3000/main.bundle.js:22877:38)在MergeMapSubscriber._tryNext(localhost:3000/main.bundle.js:22874:14)在MergeMapSubscriber._next(localhost:3000/main.bundle.js:22857:18)在MergeMapSubscriber.Subscriber.next(localhost:3000/main.bundle.js:5894:18)在MergeMapSubscriber.notifyNext(localhost:3000/main.bundle.js:22890:30)在InnerSubscriber._next(localhost:3000/main.bundle.js:85350:21)在InnerSubscriber.Subscriber.next(localhost:3000/main.bundle.js:5894:18)在MapSubscriber._next(localhost:3000/main.bundle.js:23024:26)在MapSubscriber.Subscriber.next(localhost:3000/main.bundle.js:5894:18)在EverySubscriber.notifyComplete(localhost:3000/main.bundle.js:67454:26)在EverySubscriber._complete(localhost:3000/main.bundle.js:67471:14)在EverySubscriber.Subscriberplete(localhost:3000/main.bundle.js:5919:18)在MergeMapSubscriber._complete(localhost:3000/main.bundle.js:22882:30)在MergeMapSubscriber.Subscriberplete(localhost:3000/main.bundle.js:5919:18)在ArrayObservable._subscribe(localhost:3000/main.bundle.js:66973:24)在ArrayObservable.Observable.subscribe(localhost:3000/main.bundle.js:4131:27)在MergeMapOperator.call(localhost:3000/main.bundle.js:22832:23)在Observable.subscribe(localhost:3000/main.bundle.js:4128:22)在EveryOperator.call(localhost:3000/main.bundle.js:67434:23)在Observable.subscribe(localhost:3000/main.bundle.js:4128:22)在MapOperator.call(localhost:3000/main.bundle.js:22995:23)在Observable.subscribe(localhost:3000/main.bundle.js:4128:22)在Object.subscribeToResult(localhost:3000/main.bundle.js:46412:27)在MergeMapSubscriber._innerSub(localhost:3000/main.bundle.js:22877:38)在MergeMapSubscriber._tryNext(localhost:3000/main.bundle.js:22874:14)在MergeMapSubscriber._next(localhost:3000/main.bundle.js:22857:18)在MergeMapSubscriber.Subscriber.next(localhost:3000/main.bundle.js:5894:18)

推荐答案

更新

已在 0.7.6

github/angular/zone.js/blob/master/CHANGELOG.md#076-2017-01-17

以前的版本

将zonejs降级到 0.7.4 github/angular/zone.js/issues/595

Downgrade zonejs to 0.7.4 github/angular/zone.js/issues/595

npm install --save zone.js@0.7.4

更多推荐

如何使用webpack调试Angular 2?

本文发布于:2023-10-09 06:16:07,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1474928.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:如何使用   webpack   Angular

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!