Angular cli 带角度库E/启动器的量角器e2e测试-错误:参考错误:未定义窗口

Angular cli 带角度库E/启动器的量角器e2e测试-错误:参考错误:未定义窗口,angular-cli,ng-packagr,Angular Cli,Ng Packagr,我使用angular cli 6开发了一些angular库。 使用量角器运行e2e时出现以下错误: E/launcher - Error: ReferenceError: window is not defined at Object.<anonymous> (C:\Projects\p1\node_modules\ngx-bootstrap\bundles\webpack:\ngx-bootstrap.umd\webpack\universalModuleDefinitio

我使用angular cli 6开发了一些angular库。 使用量角器运行e2e时出现以下错误:

E/launcher - Error: ReferenceError: window is not defined
    at Object.<anonymous> (C:\Projects\p1\node_modules\ngx-bootstrap\bundles\webpack:\ngx-bootstrap.umd\webpack\universalModuleDefinition:10:2)
    at Module._compile (module.js:643:30)
    at Object.Module._extensions..js (module.js:654:10)
    at Module.load (module.js:556:32)
    at tryModuleLoad (module.js:499:12)
    at Function.Module._load (module.js:491:3)
    at Module.require (module.js:587:17)
    at require (internal/module.js:11:18)
    at C:\Users\ee44143\Projects\mifid2-ui-trunk\dist\sg-ng-core-components\bundles\sg-ng-core-components.umd.js:2:268
    at Object.<anonymous> (C:\Projects\p1\dist\sg-ng-core-components\bundles\sg-ng-core-components.umd.js:5:2)
Closing report
[11:47:28] E/launcher - Process exited with error code 100
An unexpected error occurred: undefined
在谷歌上,我找不到解决方案。 有人知道如何解决这个问题吗

  "peerDependencies": {
    "@angular/common": "^6.0.0-rc.0 || ^6.0.0",
    "@angular/core": "^6.0.0-rc.0 || ^6.0.0",
    "@angular/platform-browser": "^6.0.0-rc.0 || ^6.0.0",
    "@angular/platform-browser-dynamic": "^6.0.0-rc.0 || ^6.0.0",
    "@angular/http": "^6.0.0-rc.0 || ^6.0.0",
    "@angular/router": "^6.0.0-rc.0 || ^6.0.0",
    "ngx-bootstrap": "^3.0.1",
    "rxjs": "^6.2.1",
    "rxjs-compat": "^6.2.1"
  },