gpt4 book ai didi

Angular zone.js - zone-evergreen.js 错误 : t. getElementsByTagName 不是函数

转载 作者:行者123 更新时间:2023-12-04 16:35:33 28 4
gpt4 key购买 nike

我在 Angular 11 上有一个应用程序刚刚开始在所有浏览器、所有环境(本地/暂存/生产)上同时出现错误(大约一个小时前,没有任何更新或任何东西):

Uncaught TypeError: t.getElementsByTagName is not a function
at computeStackTrace.js:338
at Array.forEach (<anonymous>)
at computeStackTrace.js:338
at Array.forEach (<anonymous>)
at MutationObserver.<anonymous> (computeStackTrace.js:338)
at l.invoke (polyfills.98c82c2662d9589ab04d.js:formatted:278)
at a.runGuarded (polyfills.98c82c2662d9589ab04d.js:formatted:119)
at MutationObserver.<anonymous> (polyfills.98c82c2662d9589ab04d.js:formatted:98)

我们的 package.json 依赖项:

    "dependencies": {
"@angular-material-components/color-picker": "^5.0.0",
"@angular-material-components/datetime-picker": "^5.0.0",
"@angular/animations": "^11.2.14",
"@angular/cdk": "^11.2.13",
"@angular/common": "^11.2.14",
"@angular/compiler": "^11.2.14",
"@angular/core": "^11.2.14",
"@angular/forms": "^11.2.14",
"@angular/material": "^11.2.13",
"@angular/platform-browser": "^11.2.14",
"@angular/platform-browser-dynamic": "^11.2.14",
"@angular/router": "^11.2.14",
"@ngx-translate/core": "^13.0.0",
"@ngx-translate/http-loader": "^6.0.0",
"@sentry/angular": "^6.7.1",
"@sentry/integrations": "^6.7.2",
"@sentry/tracing": "^6.7.1",
"@swimlane/ngx-charts": "^16.0.0",
"amplitude-js": "^7.3.1",
"bootstrap": "^4.5.3",
"flag-icon-css": "^3.5.0",
"http-status-codes": "^1.4.0",
"jspdf": "^2.3.1",
"jwt-decode": "^2.2.0",
"libphonenumber-js": "^1.9.36",
"lodash": "^4.17.21",
"messageformat": "^2.3.0",
"ng2-pdfjs-viewer": "^6.0.1",
"ngx-kjua": "^1.12.3",
"ngx-mat-select-search": "^3.3.0",
"ngx-translate-messageformat-compiler": "^4.9.0",
"rxjs": "^6.6.3",
"slugify": "^1.5.3",
"tslib": "^2.0.0",
"zone.js": "~0.10.2"
},

我们尝试了几件事(甚至在本地升级到 Angular 12,错误仍然存​​在),但没有任何效果:(

有人见过类似的东西吗?

最佳答案

解决了! 2 个小时后,我们终于找到了罪魁祸首:index.html 中导入的 Hubspot (CRM) 脚本……(显然它破坏了 HTML 结构)

我们删除了 <script>标签,一切立即恢复正常......把它留在这里以防有一天有人遇到同样的问题!

关于Angular zone.js - zone-evergreen.js 错误 : t. getElementsByTagName 不是函数,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/70186776/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com