错误:在Angular CLI >6.0中,Karma插件现在由"@angular-devkit/build-angular“导出,而不是我得到这个错误
// Karma配置文件,详见链接// https://karma-runner.github.io/1.0/config/configuration-file.html
module.exports = function (config) { config.set({ basePath:'',frameworks:'jasmine','@angular-devkit/build-angular',插件: require('karma-jasmine'),require('karma-chrome-launcher'),require('karma-jasmine-html-reporter'),require(‘karma-coverage-karma-reporter’),require('@angular/cli/plugins/karma'),客户端:{ clearContext: false //使Jasmine Spec Runner输出在浏览器中可见},coverageIstanbulReporter:{ reports:'html','lcovonly‘,fixWebpackSourcePaths: true },angularCli:{ environment:'dev’},reports:'progress','kjhtml',端口: 9876,colors: true,logLevel: config.LOG_INFO,autoWatch: true,browsers:'Chrome',singleRun: false });};
发布于 2019-11-08 07:19:55
在你的Karma.conf.js中,用@angular-devkit/build-angular替换@angular/cli
https://stackoverflow.com/questions/58059452
复制相似问题