Invalid config file! - Unspecified intellij internal parameter: user-config
Hi,
since I've updated to Ubuntu 18.04 I've problem running my angular tests. Maybe it has nothing to do with the update but I first noticed it now ...
I just started with a fresh PhpStorm setup (deleted all .PhpStorm201* folders). I installed the karma-plugin and setup a fresh angular project. Then I run the tests in the autogenerated app.component.spec.ts and this is the error I get
/snap/bin/node /home/USER/Development/testNgCli/node_modules/@angular/cli/bin/ng test testNgCli --karma-config /home/USER/.PhpStorm2018.2/config/plugins/js-karma/js_reporter/karma-intellij/lib/intellij.conf.js
10 08 2018 18:51:08.663:ERROR [config]: Invalid config file!
Error: Unspecified intellij internal parameter: user-config
at getRequiredParam (/home/USER/.PhpStorm2018.2/config/plugins/js-karma/js_reporter/karma-intellij/lib/karma-intellij-parameters.js:10:11)
at Object.getUserConfigFilePath (/home/USER/.PhpStorm2018.2/config/plugins/js-karma/js_reporter/karma-intellij/lib/karma-intellij-parameters.js:16:10)
at Object.<anonymous> (/home/USER/.PhpStorm2018.2/config/plugins/js-karma/js_reporter/karma-intellij/lib/intellij.conf.js:3:45)
at Module._compile (internal/modules/cjs/loader.js:689:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10)
at Module.load (internal/modules/cjs/loader.js:599:32)
at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
at Function.Module._load (internal/modules/cjs/loader.js:530:3)
at Module.require (internal/modules/cjs/loader.js:637:17)
at require (internal/modules/cjs/helpers.js:20:18)
at Object.parseConfig (/home/USER/Development/testNgCli/node_modules/karma/lib/config.js:363:22)
at new Server (/home/USER/Development/testNgCli/node_modules/karma/lib/server.js:56:20)
at Observable.rxjs_1.Observable.obs [as _subscribe] (/home/USER/Development/testNgCli/node_modules/@angular-devkit/build-angular/src/karma/packages/angular_devkit/build_angular/src/karma/index.ts:93:29)
at Observable._trySubscribe (/home/USER/Development/testNgCli/node_modules/rxjs/src/internal/Observable.ts:223:19)
at Observable.subscribe (/home/USER/Development/testNgCli/node_modules/rxjs/src/internal/Observable.ts:204:14)
at /home/USER/Development/testNgCli/node_modules/rxjs/src/internal/util/subscribeTo.ts:22:23
Process finished with exit code 1
What's the Problem? Am I doing somthing wrong?
Thanks for help
p.s. there is no problem when I run the tests via ng test in the terminal
Here is my karma.conf.js
// Karma configuration file, see link for more information
// https://karma-runner.github.io/1.0/config/configuration-file.html
module.exports = function (config) {
config.set({
basePath: '',
frameworks: ['jasmine', '@angular-devkit/build-angular'],
plugins: [
require('karma-jasmine'),
// require('karma-chrome-launcher'),
require('karma-phantomjs-launcher'),
require('karma-jasmine-html-reporter'),
require('karma-coverage-istanbul-reporter'),
require('@angular-devkit/build-angular/plugins/karma')
],
client: {
clearContext: false // leave Jasmine Spec Runner output visible in browser
},
coverageIstanbulReporter: {
dir: require('path').join(__dirname, '../coverage'),
reports: ['html', 'lcovonly'],
fixWebpackSourcePaths: true
},
reporters: ['progress', 'kjhtml'],
port: 9876,
colors: true,
logLevel: config.LOG_INFO,
autoWatch: true,
browsers: ['PhantomJS'],
singleRun: false
});
};
and I use
"@angular/cli": "~6.1.3"
请先登录再写评论。
what CLI version do you use? What does your karma run configuration look like? Please attach a screenshot
Hello I have ubuntu 18.10 and latest Webstorm. I fixed that problem by modifying plugin source code.
You can find file /home/$USER/.Apps/WebStorm-182.5107.19/plugins/js-karma/js_reporter/karma-intellij/lib/karma-intellij-parameters.js