在Windows版本18中Edge Webview上出现多个错误.x与polyfill Core-js



Edge版本:Mozilla/5.0 (Windows NT 10.0;WOW64;MSAppHost/3.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/64.0.3282.140 Safari/537.36 Edge/18.17763

系统:节点:v14.19.1NPM: 6.14.16

npm I core-js@3.27.0

用法:polyfill.ts进口core-js/实际的;

当我启动应用程序时,我看到下面的错误和应用程序没有加载。我在一个Angular 14项目中使用core-js。

Exception was thrown at line 1, column 78939 in ms-appx-web://com.xxx.xxx/www/polyfills.05dd23503fa72111.js
0x800a15fb - JavaScript runtime error: 'newTarget' is not a constructor
Exception was thrown at line 1, column 49225 in ms-appx-web://com.xxx.xxx/www/polyfills.05dd23503fa72111.js
0x800a138f - JavaScript runtime error: Array.prototype.every: 'this' is null or undefined
Exception was thrown at line 1, column 49225 in ms-appx-web://com.xxx.xxx/www/polyfills.05dd23503fa72111.js
0x800a138f - JavaScript runtime error: Array.prototype.forEach: 'this' is null or undefined
Exception was thrown at line 1, column 56073 in ms-appx-web://com.xxx.xxx/www/polyfills.05dd23503fa72111.js
0x800a139e - JavaScript runtime error: 2
Exception was thrown at line 1, column 49225 in ms-appx-web://com.xxx.xxx/www/polyfills.05dd23503fa72111.js
0x800a138f - JavaScript runtime error: Array.prototype.indexOf: 'this' is null or undefined
Exception was thrown at line 1, column 49225 in ms-appx-web://com.xxx.xxx/www/polyfills.05dd23503fa72111.js
0x800a138f - JavaScript runtime error: Unable to get property 'length' of undefined or null reference
Exception was thrown at line 1, column 49225 in ms-appx-web://com.xxx.xxx/www/polyfills.05dd23503fa72111.js
0x800a138f - JavaScript runtime error: Array.prototype.lastIndexOf: 'this' is null or undefined
Exception was thrown at line 1, column 49792 in ms-appx-web://com.xxx.xxx/www/polyfills.05dd23503fa72111.js
0x800a13b5 - JavaScript runtime error: Assignment to read-only properties is not allowed in strict mode
Exception was thrown at line 1, column 122312 in ms-appx-web://com.xxx.xxx/www/polyfills.05dd23503fa72111.js
0x800a01bd - JavaScript runtime error: Object doesn't support this action
Exception was thrown at line 1, column 49225 in ms-appx-web://com.xxx.xxx/www/polyfills.05dd23503fa72111.js
0x800a138f - JavaScript runtime error: Array.prototype.reduce: 'this' is null or undefined
Exception was thrown at line 1, column 49225 in ms-appx-web://com.xxx.xxx/www/polyfills.05dd23503fa72111.js
0x800a138f - JavaScript runtime error: Array.prototype.reduceRight: 'this' is null or undefined
Exception was thrown at line 1, column 49225 in ms-appx-web://com.xxx.xxx/www/polyfills.05dd23503fa72111.js
0x800a138f - JavaScript runtime error: Array.prototype.some: 'this' is null or undefined
Exception was thrown at line 1, column 124310 in ms-appx-web://com.xxx.xxx/www/polyfills.05dd23503fa72111.js
0x800a138a - JavaScript runtime error: Array.prototype.sort: argument is not a Function object
Exception was thrown at line 1, column 49225 in ms-appx-web://com.xxx.xxx/www/polyfills.05dd23503fa72111.js
0x800a138f - JavaScript runtime error: Array.prototype.sort: 'this' is null or undefined
Exception was thrown at line 1, column 126005 in ms-appx-web://com.xxx.xxx/www/polyfills.05dd23503fa72111.js
0x800a01bd - JavaScript runtime error: Object doesn't support this action
Exception was thrown at line 1, column 42355 in ms-appx-web://com.xxx.xxx/www/polyfills.05dd23503fa72111.js
0x800a1600 - JavaScript runtime error: ArrayBuffer: cannot be called without the new keyword
Exception was thrown at line 1, column 42376 in ms-appx-web://com.xxx.xxx/www/polyfills.05dd23503fa72111.js
0x800a13a5 - JavaScript runtime error: Array length must be a finite positive integer
Exception was thrown at line 1, column 62757 in ms-appx-web://com.xxx.xxx/www/polyfills.05dd23503fa72111.js
0x800a1389 - JavaScript runtime error: Number expected
Exception was thrown at line 1, column 136893 in ms-appx-web://com.xxx.xxx/www/polyfills.05dd23503fa72111.js
0x800a13a2 - JavaScript runtime error: The number of fractional digits is out of range
Exception was thrown at line 1, column 136918 in ms-appx-web://com.xxx.xxx/www/polyfills.05dd23503fa72111.js
0x800a13a2 - JavaScript runtime error: The number of fractional digits is out of range
Exception was thrown at line 1, column 138988 in ms-appx-web://com.xxx.xxx/www/polyfills.05dd23503fa72111.js
0x800a1389 - JavaScript runtime error: Number.prototype.toPrecision: 'this' is not a Number object
Exception was thrown at line 1, column 92478 in ms-appx-web://com.xxx.xxx/www/polyfills.05dd23503fa72111.js
0x800a138f - JavaScript runtime error: Object.prototype.defineSetter: 'this' is null or undefined
Exception was thrown at line 1, column 150367 in ms-appx-web://com.xxx.xxx/www/polyfills.05dd23503fa72111.js
0x800a1624 - JavaScript runtime error: Reflect.apply: argument is not an array or array-like object
Exception was thrown at line 1, column 150711 in ms-appx-web://com.xxx.xxx/www/polyfills.05dd23503fa72111.js
0x800a1624 - JavaScript runtime error: Reflect.construct: argument is not an array or array-like object
Exception was thrown at line 1, column 97538 in ms-appx-web://com.xxx.xxx/www/polyfills.05dd23503fa72111.js
0x800a1399 - JavaScript runtime error: Syntax error in regular expression
Exception was thrown at line 1, column 97677 in ms-appx-web://com.xxx.xxx/www/polyfills.05dd23503fa72111.js
0x800a139a - JavaScript runtime error: Unexpected quantifier
Exception was thrown at line 1, column 154388 in ms-appx-web://com.xxx.xxx/www/polyfills.05dd23503fa72111.js
0x800a1399 - JavaScript runtime error: Syntax error in regular expression
Exception was thrown at line 1, column 156372 in ms-appx-web://com.xxx.xxx/www/polyfills.05dd23503fa72111.js
0x800a138f - JavaScript runtime error: Unable to get property 'get' of undefined or null reference
Exception was thrown at line 1, column 157301 in ms-appx-web://com.xxx.xxx/www/polyfills.05dd23503fa72111.js
0x800a1398 - JavaScript runtime error: RegExp.prototype.toString: 'this' is not a RegExp object
Exception was thrown at line 1, column 157947 in ms-appx-web://com.xxx.xxx/www/polyfills.05dd23503fa72111.js
0x800a01b6 - JavaScript runtime error: Object doesn't support property or method 'at'
Exception was thrown at line 1, column 61488 in ms-appx-web://com.xxx.xxx/www/polyfills.05dd23503fa72111.js
0x800a1608 - JavaScript runtime error: String.prototype.endsWith: first argument cannot be a RegExp
Exception was thrown at line 1, column 61513 in ms-appx-web://com.xxx.xxx/www/polyfills.05dd23503fa72111.js
0x800a1608 - JavaScript runtime error: String.prototype.endsWith: first argument cannot be a RegExp
Exception was thrown at line 1, column 61488 in ms-appx-web://com.xxx.xxx/www/polyfills.05dd23503fa72111.js
0x800a1608 - JavaScript runtime error: String.prototype.includes: first argument cannot be a RegExp
Exception was thrown at line 1, column 61513 in ms-appx-web://com.xxx.xxx/www/polyfills.05dd23503fa72111.js
0x800a1608 - JavaScript runtime error: String.prototype.includes: first argument cannot be a RegExp
Exception was thrown at line 1, column 61488 in ms-appx-web://com.xxx.xxx/www/polyfills.05dd23503fa72111.js
0x800a1608 - JavaScript runtime error: String.prototype.startsWith: first argument cannot be a RegExp
Exception was thrown at line 1, column 61513 in ms-appx-web://com.xxx.xxx/www/polyfills.05dd23503fa72111.js
0x800a1608 - JavaScript runtime error: String.prototype.startsWith: first argument cannot be a RegExp
Exception was thrown at line 1, column 104719 in ms-appx-web://com.xxx.xxx/www/polyfills.05dd23503fa72111.js
0x800a01b6 - JavaScript runtime error: Object doesn't support property or method 'trimEnd'
Exception was thrown at line 1, column 104719 in ms-appx-web://com.xxx.xxx/www/polyfills.05dd23503fa72111.js
0x800a01b6 - JavaScript runtime error: Object doesn't support property or method 'trimStart'
Exception was thrown at line 1, column 111712 in ms-appx-web://com.xxx.xxx/www/polyfills.05dd23503fa72111.js
0x800a1600 - JavaScript runtime error: [TypedArray]: cannot be called without the new keyword
Exception was thrown at line 1, column 111734 in ms-appx-web://com.xxx.xxx/www/polyfills.05dd23503fa72111.js
0x800a13dc - JavaScript runtime error: Invalid offset/length when creating typed array
Exception was thrown at line 1, column 178462 in ms-appx-web://com.xxx.xxx/www/polyfills.05dd23503fa72111.js
0x800a13db - JavaScript runtime error: 'this' is not a typed array object
Exception was thrown at line 1, column 181476 in ms-appx-web://com.xxx.xxx/www/polyfills.05dd23503fa72111.js
0x800a138a - JavaScript runtime error: [TypedArray].prototype.sort: argument is not a Function object
Exception was thrown at line 1, column 181509 in ms-appx-web://com.xxx.xxx/www/polyfills.05dd23503fa72111.js
0x800a138a - JavaScript runtime error: [TypedArray].prototype.sort: argument is not a Function object
Exception was thrown at line 1, column 201309 in ms-appx-web://com.xxx.xxx/www/polyfills.05dd23503fa72111.js
0x800a139e - JavaScript runtime error: InvalidCharacterError
Exception was thrown at line 1, column 201342 in ms-appx-web://com.xxx.xxx/www/polyfills.05dd23503fa72111.js
0x8000ffff - JavaScript runtime error: Argument not optional
Exception was thrown at line 1, column 201919 in ms-appx-web://com.xxx.xxx/www/polyfills.05dd23503fa72111.js
0x8000ffff - JavaScript runtime error: Argument not optional
Exception was thrown at line 1, column 204170 in ms-appx-web://com.xxx.xxx/www/polyfills.05dd23503fa72111.js
0x800a138a - JavaScript runtime error: Function expected
Exception was thrown at line 1, column 207703 in ms-appx-web://com.xxx.xxx/www/polyfills.05dd23503fa72111.js
0x800a138f - JavaScript runtime error: Object expected
Exception was thrown at line 1, column 208014 in ms-appx-web://com.xxx.xxx/www/polyfills.05dd23503fa72111.js
0x800a138a - JavaScript runtime error: Function expected
Exception was thrown at line 1, column 207571 in ms-appx-web://com.xxx.xxx/www/polyfills.05dd23503fa72111.js
0x800a138f - JavaScript runtime error: Object expected
Exception was thrown at line 1, column 112871 in ms-appx-web://com.xxx.xxx/www/polyfills.05dd23503fa72111.js
0x8000ffff - JavaScript runtime error: Invalid argument
Exception was thrown at line 1, column 200598 in ms-appx-web://com.xxx.xxx/www/polyfills.05dd23503fa72111.js
0x800a01b6 - JavaScript runtime error: Object doesn't support property or method 'toSpliced'
Exception was thrown at line 1, column 200942 in ms-appx-web://com.xxx.xxx/www/polyfills.05dd23503fa72111.js
0x800a01b6 - JavaScript runtime error: Object doesn't support property or method 'with'
Exception was thrown at line 1, column 100245 in ms-appx-web://com.xxx.xxx/www/polyfills.05dd23503fa72111.js
0x800a01b6 - JavaScript runtime error: Object doesn't support property or method 'difference'
Exception was thrown at line 1, column 100245 in ms-appx-web://com.xxx.xxx/www/polyfills.05dd23503fa72111.js
0x800a01b6 - JavaScript runtime error: Object doesn't support property or method 'intersection'
Exception was thrown at line 1, column 100245 in ms-appx-web://com.xxx.xxx/www/polyfills.05dd23503fa72111.js
0x800a01b6 - JavaScript runtime error: Object doesn't support property or method 'isDisjointFrom'
Exception was thrown at line 1, column 100245 in ms-appx-web://com.xxx.xxx/www/polyfills.05dd23503fa72111.js
0x800a01b6 - JavaScript runtime error: Object doesn't support property or method 'isSubsetOf'
Exception was thrown at line 1, column 100245 in ms-appx-web://com.xxx.xxx/www/polyfills.05dd23503fa72111.js
0x800a01b6 - JavaScript runtime error: Object doesn't support property or method 'isSupersetOf'
Exception was thrown at line 1, column 100245 in ms-appx-web://com.xxx.xxx/www/polyfills.05dd23503fa72111.js
0x800a01b6 - JavaScript runtime error: Object doesn't support property or method 'union'
Exception was thrown at line 1, column 100245 in ms-appx-web://com.xxx.xxx/www/polyfills.05dd23503fa72111.js
0x800a01b6 - JavaScript runtime error: Object doesn't support property or method 'symmetricDifference'
Exception was thrown at line 1, column 181795 in ms-appx-web://com.xxx.xxx/www/main.68c918428a7870f0.js
0x80004005 - JavaScript runtime error: unknown exception
Exception was thrown at line 1, column 195391 in ms-appx-web://com.xxx.xxx/www/main.68c918428a7870f0.js
0x80004005 - JavaScript runtime error: unknown exception
Exception was thrown at line 1, column 17847 in ms-appx-web://com.xxx.xxx/www/polyfills.05dd23503fa72111.js
0x80004005 - JavaScript runtime error: unknown exception
Exception was thrown at line 1, column 17847 in ms-appx-web://com.xxx.xxx/www/polyfills.05dd23503fa72111.js
0x80004005 - JavaScript runtime error: unknown exception
Exception was thrown at line 1, column 16336 in ms-appx-web://com.xxx.xxx/www/polyfills.05dd23503fa72111.js
0x80004005 - JavaScript runtime error: unknown exception

请在这里帮助修复这些只在Edge浏览器的polyfill问题。

我认为您需要的是正确的core-js导入(除了您已经拥有的core-js/actual-供参考:我没有在我的项目中使用该导入)以使此工作。我目前在我的polyfills.ts中使用以下导入来支持Edge>= 15。

/** required for Edge 15 and up */
import 'core-js/es/array';
import 'core-js/es/object';
import 'core-js/es/promise'; // edge 15 does not have `finally`

我希望这解决了你的问题!

相关内容

最新更新