Uncaught TypeError: 无法设置仅具有 getter 的 [object Object] 的属性“once”

huangapple go评论77阅读模式
英文:

Uncaught TypeError: Cannot set property once of [object Object] which has only a getter

问题

Uncaught TypeError: Cannot set property once of [object Object] which has only a getter at HTMLDivElement.addEventListener (polyfills.js:1:146664)

在升级 Angular 版本时遇到上述问题。

请查看图片:

Uncaught TypeError: 无法设置仅具有 getter 的 [object Object] 的属性“once”

英文:

`Uncaught TypeError: Cannot set property once of [object Object] which has only a getter at HTMLDivElement.addEventListener (polyfills.js:1:146664)

Facing this above issue while upgrading angular version.

Please check image

Uncaught TypeError: 无法设置仅具有 getter 的 [object Object] 的属性“once”

答案1

得分: 1

Version 2.7 of @webcomponents/webcomponentsjs似乎引入了一个导致此错误的错误。我是通过zone.js和webcomponents的交互在Angular项目中发现的。
该错误描述在此处:https://github.com/webcomponents/polyfills/issues/531

截至版本2.8,似乎还没有修复,因此建议的解决方法似乎是降级到版本2.6。

英文:

Version 2.7 of @webcomponents/webcomponentsjs seems to have introduced a bug which causes this error. I found it through the interaction of zone.js and webcomponents, also in an Angular project.
The bug description is here: https://github.com/webcomponents/polyfills/issues/531

It seems to not have been fixed as of version 2.8, so the proposed workaround seems to be to downgrade to version 2.6.

huangapple
  • 本文由 发表于 2023年2月8日 13:44:08
  • 转载请务必保留本文链接:https://go.coder-hub.com/75381770.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定