因果报错:ChromeHeadless并未在2000毫秒的SIGKILL中被杀死角度的

问题描述

业力配置:

在我的角度应用程序上运行npm时运行测试。 查看AppData中的npm错误日志,那里的信息几乎没有任何有用的信息。只需记录同一件事

EventEmitter的13个详细堆栈。 (C:\ Program Files \ nodejs \ node_modules \ npm \ node_> ChildProcess.emit的13个详细堆栈(即使 在EventEmitter.emit(events.js:315:20) ChildProcess上的13个详细堆栈。 (C:\ Program Files \ nodejs \ node_modules \ npm \ node_> 13详细堆栈
在ChildProcess.emit(events.js:315:20) 13个详细的堆栈在mayyClose(internal / child_process.js:1021:16) Process.ChildProcess._handle.onexit上的13个详细堆栈(internal / child_process.js:286:5)

// Karma configuration file,see link for more information
// https://karma-runner.github.io/1.0/config/configuration-file.html

module.exports = function (config) {
  const plugins = [
    require('karma-jasmine'),require('karma-jasmine-html-reporter'),require('karma-coverage-istanbul-reporter'),require('@angular/cli/plugins/karma'),require('karma-chrome-launcher'),require('karma-mocha-reporter'),];

  config.set({
    basePath: '',frameworks: ['jasmine','@angular/cli'],plugins: plugins,client: {
      clearContext: false,// leave Jasmine Spec Runner output visible in browser
    },captureTimeout: 30000,browserdisconnectTolerance: 3,browserdisconnectTimeout: 30000,browserNoActivityTimeout: 30000,browsers: ['ChromeHeadless_custom'],customLaunchers: {
      ChromeHeadless_custom: {
        base: "ChromeHeadless",flags: [
          '--disable-extensions','--no-sandBox','--disable-web-security','--no-proxy-server'
        ]
      }
    },coverageIstanbulReporter: {
      reports: ['html','lcovonly','text-summary'],fixWebpackSourcePaths: true,thresholds: {
        emitWarning: false,global: {
          statements: 0,lines: 0,branches: 0,functions: 0,},angularCli: {
      environment: 'dev',reporters: ['mocha','kjhtml'],port: 9876,colors: true,logLevel: config.LOG_INFO,autoWatch: true,singleRun: false,mochaReporter: {
      output: 'minimal',});
};

测试脚本

"test": "ng test --sm=false --single-run --no-progress",

完全错误

START:
07 10 2020 11:31:30.075:INFO [karma]: Karma v2.0.0 server started at http://0.
07 10 2020 11:31:30.076:INFO [launcher]: Launching browser ChromeHeadless_custmited concurrency
07 10 2020 11:31:30.081:INFO [launcher]: Starting browser ChromeHeadless
07 10 2020 11:32:00.086:WARN [launcher]: ChromeHeadless have not captured in 3ling.
07 10 2020 11:32:02.088:WARN [launcher]: ChromeHeadless was not killed in 2000 SIGKILL.
07 10 2020 11:32:04.091:WARN [launcher]: ChromeHeadless was not killed by SIGK
ms,continuing.

Finished in 0 secs / 0 secs @ 11:32:04 GMT+0100 (British Summer Time)

npm ERR! errno 1
npm ERR! frontend@4.6.0 test: `ng test --sm=false --single-run --no-progress`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the frontend@4.6.0 test script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\chris\AppData\Roaming\npm-cache\_logs\2020-10-07T10_32_04_519Z-debug.log 

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)