Node.js 警告[launcher]:幻影在60000毫秒内没有被捕获,正在死亡

Node.js 警告[launcher]:幻影在60000毫秒内没有被捕获,正在死亡,node.js,npm,phantomjs,karma-runner,Node.js,Npm,Phantomjs,Karma Runner,我知道还有其他关于这个问题的帖子,但是我一整天都找不到任何有助于解决我的问题的帖子,我想知道是否有人知道修复方法,或者是否有人能够根据我的特定软件包版本为我指出正确的方向 我正在运行gulp来构建我的项目,当它到达karma/karma-coverage.conf.js文件时,它会出错,并出现我在标题->PhantomJS在60000毫秒内未捕获的警告,导致 我正在运行NPMv3.3.7,节点v6.10.1 My package.json: { "engines": { "node"

我知道还有其他关于这个问题的帖子,但是我一整天都找不到任何有助于解决我的问题的帖子,我想知道是否有人知道修复方法,或者是否有人能够根据我的特定软件包版本为我指出正确的方向

我正在运行gulp来构建我的项目,当它到达karma/karma-coverage.conf.js文件时,它会出错,并出现我在标题->PhantomJS在60000毫秒内未捕获的警告,导致

我正在运行NPMv3.3.7,节点v6.10.1

My package.json:

{
  "engines": {
    "node": ">=4.2.4",
    "npm": ">=2.1.6"
  },
  "dependencies": {},
  "devDependencies": {
    "browser-sync": "1.9.0",
    "date-format": "0.0.2",
    "del": "1.1.1",
    "dgeni": "^0.4.1",
    "dgeni-packages": "^0.10.13",
    "glob": "^6.0.4",
    "gulp": "3.8.10",
    "gulp-angular-filesort": "1.0.4",
    "gulp-batch": "1.0.4",
    "gulp-bump": "0.3.0",
    "gulp-concat": "2.4.3",
    "gulp-copy": "0.0.2",
    "gulp-filelist": "0.1.0",
    "gulp-filter": "2.0.0",
    "gulp-header": "1.2.2",
    "gulp-help": "1.3.1",
    "gulp-if": "1.2.5",
    "gulp-ignore": "1.2.1",
    "gulp-inject": "1.1.1",
    "gulp-load-plugins": "0.8.0",
    "gulp-minify-css": "^0.4.4",
    "gulp-minify-html": "0.1.8",
    "gulp-ng-html2js": "0.1.8",
    "gulp-rename": "1.2.0",
    "gulp-replace": "0.5.2",
    "gulp-ruby-sass": "0.7.1",
    "gulp-sourcemaps": "1.3.0",
    "gulp-strip-debug": "1.0.2",
    "gulp-tap": "0.1.3",
    "gulp-tslint": "4.3.3",
    "gulp-typescript": "2.10.0",
    "gulp-uglify": "^1.1.0",
    "gulp-useref": "^1.1.2",
    "gulp-util": "3.0.2",
    "gulp-watch": "^4.1.0",
    "gulp-zip": "^3.0.2",
    "jshint-stylish": "1.0.0",
    "karma": "0.12.25",
    "karma-as-promised": "1.0.0",
    "karma-chrome-launcher": "0.1.5",
    "karma-coverage": "0.2.6",
    "karma-firefox-launcher": "0.1.3",
    "karma-ie-launcher": "^0.1.5",
    "karma-jasmine": "0.2.3",
    "karma-junit-reporter": "0.2.2",
    "karma-ng-html2js-preprocessor": "0.1.2",
    "karma-phantomjs-launcher": "^1.0.0",
    "license-collector": "^0.1.1",
    "lodash": "^3.7.0",
    "main-bower-files": "2.1.0",
    "merge-stream": "^1.0.0",
    "phantomjs": "1.9.19",
    "phantomjs-polyfill": "0.0.1",
    "request": "2.53.0",
    "require-dir": "0.1.0",
    "run-sequence": "1.0.2",
    "shelljs": "0.3.0",
    "tslint": "3.5.0",
    "typedoc": "0.3.12",
    "typescript": "1.7.3",
    "yargs": "1.3.3"
  }
}
我的karma-coverage.conf.js

/**
 * Run Karma using this configuration file in order to have code coverage
 */

var baseConfig = require('./karma-debug.conf.js');
module.exports = function (config) {
    baseConfig(config);

    var path = require("path");

    var JS_AND_CSS_REGEXP = /(.js|.css)$/i;


    // Adds 'coverage' pre-processing on JS files
    config.preprocessors['build/debug/components/**/*.js'] = ['coverage'];

    // Adds a plugin dependency on karma-coverage
    config.plugins.push('karma-coverage');

    // Registers reporter
    config.reporters.push('coverage');

    // Browsers options : PhantomJS, Chrome ...
    config.browsers = ['PhantomJS'];
    // !!!! : Comment code below if you don't choose PhantomJS Browser : It adds the bind polyfill to phantomJS.
    config.files.push({
        pattern: 'node_modules/phantomjs-polyfill/bind-polyfill.js',
        served: true,
        included: true,
        watched: false
    });
    config.autoWatch = false;
    config.singleRun = true;

    // Configure Reporter
    config.coverageReporter = {
        reporters: [{type: 'cobertura', dir: 'build/reports/coverage/'}, {type: 'html', dir: 'build/reports/coverage/'}]
    }

    // override development configuration!
    config.browserNoActivityTimeout = 30000;

};

感谢您的帮助

请尝试添加环境变量

PHANTOMJS_BIN
有价值

C:\Program Files\nodejs\phantomjs.cmd

我遇到了类似的问题,它解决了。安装中的值可能不同。(我必须重新启动我的操作系统,win 10)

/你的执行命令是什么样子的?我只是在运行Gulp,它运行一系列的Gulp任务..然后运行我上面发布的karma文件,然后超时。但我不认为该文件中存在问题,我相信这是版本不匹配的问题。