IE 11-问题:在Angular 6到9/10升级期间,导致“堆栈空间不足”错误

时间:2020-10-15 04:48:23

标签: angular

//这是错误发生的地方。我在 polyfills-es5.js 上找到了断点。由于无法正确理解原因,因此无法解决此问题。

单击下面的链接以查看完整的错误。

enter image description here

// modern engines have queueMicrotask method
if (!queueMicrotask) {
  flush = function () {
    var parent, fn;
    if (IS_NODE && (parent = process.domain)) parent.exit();
    while (head) {
      fn = head.fn;
      head = head.next;
      try {
        fn();
      } catch (error) {
        if (head) notify();
        else last = undefined;
        throw error;
      }
    } last = undefined;
    if (parent) parent.enter();
  };

// polyfills.ts

import './global-shim';
import 'core-js/es6/symbol';
import 'core-js/es6/object';
import 'core-js/es6/function';
import 'core-js/es6/parse-int';
import 'core-js/es6/parse-float';
import 'core-js/es6/number';
import 'core-js/es6/math';
import 'core-js/es6/string';
import 'core-js/es6/date';
import 'core-js/es6/array';
import 'core-js/es6/regexp';
import 'core-js/es6/map';
import 'core-js/es6/weak-map';
import 'core-js/es6/set';
import 'classlist.js'; 
import 'core-js/es6/reflect';
import 'core-js/es7/reflect';
import 'core-js/es7/object';
import 'core-js/es7/array';
import 'web-animations-js';  
import 'zone.js/dist/zone';  
import 'intl'; 
import 'intl/locale-data/jsonp/en';

//这是 tsconfig.json

{
  "compileOnSave": false,
  "compilerOptions": {
    "baseUrl": "./",
    "outDir": "./dist/out-tsc",
    "sourceMap": true,
    "declaration": false,
    "module": "esnext",
    "moduleResolution": "node",
    "emitDecoratorMetadata": true,
    "experimentalDecorators": true,
    "importHelpers": true,
    "target": "es5",
    "typeRoots": [
      "node_modules/@types"
    ],
    "lib": [
      "es2018",
      "dom"
    ]
  }
}

//这是 package.json 文件

{
  "name": "my-amb-app",
  "version": "0.0.0",
  "license": "MIT",
  "scripts": {
    "ng": "ng",
    "dev": "node --max-old-space-size=8192 node_modules/@angular/cli/bin/ng serve --port=4201 --aot",
    "dev-ie": "ng s --no-live-reload --configuration=dev --port=4201 && cp ./Staticfile ./dist ",
    "stage": "ng s --configuration=test --port=4201",
    "serve-prod": "ng s --no-live-reload --configuration=prod && cp ./Staticfile ./dist",
    "start": "ng b --configuration=production && cp ./Staticfile ./dist",
    "ci": "ng b --configuration=ci && cp ./Staticfile ./dist",
    "build": "ng b --configuration=production && cp ./Staticfile ./dist",
    "test-coverage": "ng test --code-coverage --watch=false --browsers ChromeHeadless",
    "test-ci": "ng test --watch=false --browsers ChromeHeadlessCI",
    "test": "ng test --sourceMap=false",
    "lint": "ng lint",
    "e2e": "ng e2e",
    "rut": "ng serve --configuration es5"
  },
  "private": true,
  "dependencies": {
    "@angular-devkit/core": "^9.0.0",
    "@angular-devkit/schematics": "^9.0.0",
    "@angular/animations": "^9.0.0",
    "@angular/cdk": "^9.0.0",
    "@angular/common": "^9.0.0",
    "@angular/compiler": "^9.0.0",
    "@angular/core": "^9.0.0",
    "@angular/forms": "^9.0.0",
    "@angular/localize": "^9.0.0",
    "@angular/material": "^9.0.0",
    "@angular/platform-browser": "^9.0.0",
    "@angular/platform-browser-dynamic": "^9.0.0",
    "@angular/platform-server": "^9.0.0",
    "@angular/router": "^9.0.0",
    "@ngrx/effects": "^9.0.0",
    "@ngrx/store": "^9.0.0",
    "@ngrx/store-devtools": "^9.0.0",
    "highcharts": "6.1.1",
    "highcharts-angular": "2.8.0",
    "highcharts-pattern-fill": "3.0.2",
    "angulartics2": "^6.0.0",
    "bootstrap": "3",
    "bufferutil": "^4.0.1",
    "canvg": "^1.5.3",
    "classlist.js": "^1.1.20150312",
    "core-js": "^2.6.11",
    "fibers": "^3.1.0",
    "font-awesome": "^4.7.0",
    "foundation-sites": "^6.4.4-rc1",
    "hammerjs": "^2.0.8",
    "html-webpack-plugin": "^3.2.0",
    "html2canvas": "1.0.0-rc.5",
    "intl": "^1.2.5",
    "jquery": "^3.2.1",
    "jspdf": "^1.5.3",
    "jspdf-autotable": "3.1.0",
    "lodash": "^4.17.5",
    "lodash.merge": "^4.6.0",
    "moment": "^2.20.1",
    "ng-packagr": "^9.0.0",
    "ngx-cookie-service": "3.1.3",
    "node-sass": "^4.14.1",
    "package.json": "^2.0.1",
    "rxjs": "^6.6.3",
    "rxjs-compat": "^6.6.0",
    "source-map-explorer": "^1.5.0",
    "tslib": "^1.10.0",
    "utf-8-validate": "^5.0.2",
    "web-animations-js": "^2.3.2",
    "what-input": "^5.2.10",
    "zone.js": "^0.10.3"
  },
  "devDependencies": {
    "@angular-devkit/build-angular": "~0.901.12",
    "@angular/cli": "^9.0.0",
    "@angular/compiler-cli": "^9.0.0",
    "@angular/language-service": "^6.0.9",
    "@ngrx/schematics": "^6.0.0",
    "@types/jasmine": "^3.5.14",
    "@types/jasminewd2": "~2.0.2",
    "@types/jspdf": "^1.3.3",
    "@types/node": "^14.11.5",
    "eslint": "^7.11.0",
    "jasmine-core": "^3.6.0",
    "jasmine-reporters": "^2.3.2",
    "jasmine-spec-reporter": "^6.0.0",
    "karma": "^5.2.3",
    "karma-chrome-launcher": "^3.1.0",
    "karma-cli": "^2.0.0",
    "karma-coverage-istanbul-reporter": "^1.2.1",
    "karma-jasmine": "^4.0.1",
    "karma-jasmine-html-reporter": "^1.5.4",
    "protractor": "^7.0.0",
    "ts-node": "~3.2.0",
    "typescript": "3.8.3"
  },
  "optionalDependencies": {
    "fsevents": "^2.1.3"
  }
}

0 个答案:

没有答案