Node.js 未处理的拒绝承诺:Zone.js

Node.js 未处理的拒绝承诺:Zone.js,node.js,angular,promise,unhandled,zone.js,Node.js,Angular,Promise,Unhandled,Zone.js,我在开发人员工具中不断遇到这个错误,在过去的几天里,它一直让我心烦意乱 Unhandled Promise rejection: Zone.js has detected that ZoneAwarePromise `(window|global).Promise` has been overwritten. 因此,我已经阅读并尝试了几乎所有与修复这个涉及Zone.js的未经处理的承诺拒绝错误相关的内容,但都无济于事。 所有的错误似乎都指向我的shim.min.js文件,但似乎无论我以何种顺序

我在开发人员工具中不断遇到这个错误,在过去的几天里,它一直让我心烦意乱

Unhandled Promise rejection: Zone.js has detected that ZoneAwarePromise `(window|global).Promise` has been overwritten.
因此,我已经阅读并尝试了几乎所有与修复这个涉及Zone.js的未经处理的承诺拒绝错误相关的内容,但都无济于事。 所有的错误似乎都指向我的shim.min.js文件,但似乎无论我以何种顺序加载文件,错误仍然存在

以下是我所有的相关文件:

这是我的polyfill.ts文件:

import 'core-js/es6/reflect';
import 'core-js/es7/reflect';
import 'zone.js/dist/zone';
这是我的test.ts文件:

import 'zone.js/dist/long-stack-trace-zone';
import 'zone.js/dist/proxy.js';
import 'zone.js/dist/sync-test';
import 'zone.js/dist/jasmine-patch';
import 'zone.js/dist/async-test';
import 'zone.js/dist/fake-async-test';
import { getTestBed } from '@angular/core/testing';
import {
  BrowserDynamicTestingModule,
  platformBrowserDynamicTesting
} from '@angular/platform-browser-dynamic/testing';

// Unfortunately there's no typing for the `__karma__` variable. Just declare it as any.
declare var __karma__: any;
declare var require: any;

// Prevent Karma from running prematurely.
__karma__.loaded = function () {};

// First, initialize the Angular testing environment.
getTestBed().initTestEnvironment(
  BrowserDynamicTestingModule,
  platformBrowserDynamicTesting()
);
// Then we find all the tests.
const context = require.context('./', true, /\.spec\.ts$/);
// And load the modules.
context.keys().map(context);
// Finally, start Karma to run the tests.
__karma__.start();
如果有任何其他文件,你想看,然后让我知道


非常感谢您的帮助

通过从我的Index.html文件中删除以下内容,问题得以解决:

<!-- Configure SystemJS -->
<script src="systemjs.config.js"></script>
<script>
    System.import('app').catch(function(err){ console.error(err); });
</script

System.import('app').catch(函数(err){console.error(err);});

通过从我的Index.html文件中删除以下内容,问题得以解决:

<!-- Configure SystemJS -->
<script src="systemjs.config.js"></script>
<script>
    System.import('app').catch(function(err){ console.error(err); });
</script

System.import('app').catch(函数(err){console.error(err);});