更新Angular版本12到13的问题

发布于 2025-01-27 03:37:57 字数 937 浏览 4 评论 0原文

我已将Angular从12更新到13。更新后,我会在浏览器控制台中遇到错误。 以下是步骤:

  1. npx @angular/cli @13 update @angular/core @angular/cli @13(错误:peer依赖关系)
  2. npx @angular/cli @angular/cli @13 update @angular/core @angular/core @angular/cli @13 - Force(成功执行)
  3. NG服务
  • 在浏览器控制台中的错误以下。

    client.min.js:55 Uncaught TypeError: 'caller', 'callee', and 'arguments' properties may not be accessed on strict mode functions or the arguments objects for calls to them
        at client.min.js:55:22
        at client.min.js:54:447
        at client.min.js:53:424
        at Object.69554 (client.min.js:40:434)
        at __webpack_require__ (bootstrap:19:1)
        at Module.52790 (globals.ts:1:8)
        at __webpack_require__ (bootstrap:19:1)
        at Module.7348 (public.component.ts:8:14)
        at __webpack_require__ (bootstrap:19:1)
        at Module.50023 (app.component.ts:17:14)

 

I have update angular from 12 to 13. After updating that I am getting error in browser console.
Below are steps:

  1. npx @angular/cli@13 update @angular/core@13 @angular/cli@13(error: peer dependency)
  2. npx @angular/cli@13 update @angular/core@13 @angular/cli@13 --force(Sucessfully executed)
  3. ng serve
  • Getting below error in browser console.

    client.min.js:55 Uncaught TypeError: 'caller', 'callee', and 'arguments' properties may not be accessed on strict mode functions or the arguments objects for calls to them
        at client.min.js:55:22
        at client.min.js:54:447
        at client.min.js:53:424
        at Object.69554 (client.min.js:40:434)
        at __webpack_require__ (bootstrap:19:1)
        at Module.52790 (globals.ts:1:8)
        at __webpack_require__ (bootstrap:19:1)
        at Module.7348 (public.component.ts:8:14)
        at __webpack_require__ (bootstrap:19:1)
        at Module.50023 (app.component.ts:17:14)

 

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

雨落□心尘 2025-02-03 03:37:58

您需要将NPM,节点和打字稿更新为最新信息。我成功地将12.0升级到13.3.7。
NPM安装npm@最新-G
npm install -g typeScript@最新

you need to update your npm, node and typescript to the latest. I successfully upgraded from 12.0 to 13.3.7.
npm install npm@latest -g
npm install -g typescript@latest

阿楠 2025-02-03 03:37:58

首先,检查您的节点版本。在这里,您可以看到版本表< /a>

其次,从版本12开始。Angular CLI不支持新项目的量角。
要进行进一步的过渡,您需要使用其他 documeth a>。

First of all, check your node version. Here you can see the version table

Secondly, Starting from version 12. Angular CLI does not support Protractor for new projects.
For further transition, you need to use additional documentation.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文