升级Angular项目后,“Uncaught TypeError:Object.setPrototypeO
发布时间:2020-12-17 08:53:13 所属栏目:安全 来源:网络整理
导读:我有一个Angular应用程序,它完美地运行.但是,在使用yarn升级升级依赖项之后,我遇到了这个神秘的错误: main.bundle.js:6779 Uncaught TypeError: Object.setPrototypeOf called on null or undefined at setPrototypeOf (anonymous) at webpackJsonp.../../.
我有一个Angular应用程序,它完美地运行.但是,在使用yarn升级升级依赖项之后,我遇到了这个神秘的错误:
main.bundle.js:6779 Uncaught TypeError: Object.setPrototypeOf called on null or undefined at setPrototypeOf (<anonymous>) at webpackJsonp.../../../../../src/ui-components/src/components/phone-number-input/phone-number-input.component.ts.__extends (main.bundle.js:6779) at phone-number-input.component.ts:24 at Object.../../../../../src/ui-components/src/components/phone-number-input/phone-number-input.component.ts (phone-number-input.component.ts:69) at __webpack_require__ (bootstrap 8652e46ce92ee05aa5a3:54) at Object.../../../../../src/ui-components/src/components/phone-number-input/phone-number-input.module.ts (phone-number-input.component.ts:24) at __webpack_require__ (bootstrap 8652e46ce92ee05aa5a3:54) at Object.../../../../../src/ui-components/src/ui-components.module.ts (roman-numeral.pipe.ts:10) at __webpack_require__ (bootstrap 8652e46ce92ee05aa5a3:54) at Object.../../../../../src/app/app.module.ts (app.component.ts:31) webpackJsonp.../../../../../src/ui-components/src/components/phone-number-input/phone-number-input.component.ts.__extends @ main.bundle.js:6779 (anonymous) @ phone-number-input.component.ts:24 ../../../../../src/ui-components/src/components/phone-number-input/phone-number-input.component.ts @ phone-number-input.component.ts:69 __webpack_require__ @ bootstrap 8652e46ce92ee05aa5a3:54 ../../../../../src/ui-components/src/components/phone-number-input/phone-number-input.module.ts @ phone-number-input.component.ts:24 __webpack_require__ @ bootstrap 8652e46ce92ee05aa5a3:54 ../../../../../src/ui-components/src/ui-components.module.ts @ roman-numeral.pipe.ts:10 __webpack_require__ @ bootstrap 8652e46ce92ee05aa5a3:54 ../../../../../src/app/app.module.ts @ app.component.ts:31 __webpack_require__ @ bootstrap 8652e46ce92ee05aa5a3:54 ../../../../../src/main.ts @ environment.ts:10 __webpack_require__ @ bootstrap 8652e46ce92ee05aa5a3:54 2 @ ui-components.module.ts:108 __webpack_require__ @ bootstrap 8652e46ce92ee05aa5a3:54 webpackJsonpCallback @ bootstrap 8652e46ce92ee05aa5a3:25 (anonymous) @ main.bundle.js:1 当遵循指定的文件和行号时,我找不到任何问题. IDE显示没有问题,编译发生没有错误. 当试图注释掉错误中提到的组件时,它只是开始提到另一个组件. 可能导致这种情况的原因以及如何调试/调查这个神秘错误?
没有任何有意义的错误消息和堆栈跟踪告诉我几乎没有.我决定调查实际触发这个问题的是什么.考虑到它出现在依赖项升级之后,我已经为yarn.lock提取了差异并开始恢复它的某些部分并重新编译应用程序,检查它是否会使错误消失.经过一些繁琐的工作后,我发现它是由TypeScript从2.3.4更新到2.4.0引起的.
因此,下一步将是研究the changelog并分析我的代码中可能出现的问题. 因此,最后我建议更频繁地升级您的依赖项(这将有助于减少升级大小,以防您需要进行调查). 我希望它会对某人有所帮助.干杯! 更新 >经过进一步调查后,我发现了发生此错误的确切情况,因此我将posted an issue转到Angular GitHub存储库. (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |
推荐文章
站长推荐
- scala – Shapeless – 将案例类别转换为另一个不
- Angular:成员不可调用
- scala – 找不到隐含的……:akka.http.server.R
- twitter-bootstrap – 使用Knockout填充Bootstra
- Angular 2 – 无法绑定到’controlGroup’,因为它
- mutt命令与单个邮件unix中的多个附件
- angularjs – 使用$http POST Content-Type appl
- 如何从多个脚本同步(锁定/解锁)访问bash中的文件
- 由通过WebService上传附件给SharePoint的List时文
- 在AngularJS中添加’ng-style’的背景图像
热点阅读