DeprecationWarning:自 v4.0.0 起已弃用“getMutableClone”。使用适当的 `factory.update...` 方法代替,..(查看内部)

Den*_*nis 28 angular

“..使用setCommentRangesetSourceMapRange,并避免设置parent。” 我刚刚更新了本地 Angular CLI 版本。我的项目,现在我得到这个:“DeprecationWarning:'getMutableClone'自 v4.0.0 以来已被弃用。请使用适当的factory.update...方法,使用setCommentRangeor setSourceMapRange,并避免设置parent。” 我该如何以及在哪里可以解决这个问题?

Ser*_*udo 42

我遇到了同样的问题,我发现它取决于新版本的 typescript 4.8,我已经解决了降级它的问题(如果需要,添加 --force )。这应该安装 typescript 4.7.4

npm i typescript@"<4.8"
Run Code Online (Sandbox Code Playgroud)


ADA*_*M10 11

对我来说,我从 ng11 升级到 ng12 typescript 版本,"^4.3.5"然后我将其更改为"~4.3.5" 现在可以正常工作