Стамбульский отчет не может найти исходные карты
При попытке создать отчет в Стамбуле (приложение angular2-cli) я получаю следующую ошибку
[Error: Could not find source map for:"/Users/dylan/IdeaProjects/IssueTracker2-UI/code/dist/vendor/es6-shim/es6-shim.js"]
[Error: Could not find source map for: "/Users/dylan/IdeaProjects/IssueTracker2-UI/code/dist/vendor/zone.js/dist/zone.js"]
Error: Could not find file: "/Users/dylan/IdeaProjects/IssueTracker2-UI/code/dist/vendor/systemjs/dist/system-polyfills.js.map"
Это когда я бегу npm run posttest
, Это отмечено в моем package.json в следующем.
"posttest": "node_modules/.bin/remap-istanbul -i coverage/coverage-final.json -o coverage -t html",
"coverage": "http-server -c-1 -o -p 9875 ./coverage"
Ниже я покажу свой karma.conf.js
файл
// Karma configuration file, see link for more information
// https://karma-runner.github.io/0.13/config/configuration-file.html
module.exports = function (config) {
config.set({
basePath: '..',
frameworks: ['jasmine'],
plugins: [
require('karma-jasmine'),
require('karma-chrome-launcher'),
require('karma-coverage')
],
customLaunchers: {
// chrome setup for travis CI using chromium
Chrome_travis_ci: {
base: 'Chrome',
flags: ['--no-sandbox']
}
},
files: [
{ pattern: 'dist/vendor/es6-shim/es6-shim.js', included: true, watched: false },
{ pattern: 'dist/vendor/zone.js/dist/zone.js', included: true, watched: false },
{ pattern: 'dist/vendor/reflect-metadata/Reflect.js', included: true, watched: false },
{ pattern: 'dist/vendor/systemjs/dist/system-polyfills.js', included: true, watched: false },
{ pattern: 'dist/vendor/systemjs/dist/system.src.js', included: true, watched: false },
{ pattern: 'dist/vendor/zone.js/dist/async-test.js', included: true, watched: false },
{ pattern: 'dist/vendor/zone.js/dist/fake-async-test.js', included: true, watched: false },
{ pattern: 'config/karma-test-shim.js', included: true, watched: true },
// Distribution folder.
{ pattern: 'dist/**/*', included: false, watched: false },
{ pattern: 'src/**/*.ts', included: false, watched: false },
{ pattern: 'dist/**/*.js.map', included: false, watched: false }
],
exclude: [
// Vendor packages might include spec files. We don't want to use those.
'dist/vendor/**/*.spec.js'
],
preprocessors: {'dist/**/!(*spec).js': ['coverage']},
reporters: ['progress','dots','coverage'],
port: 9876,
colors: true,
logLevel: config.LOG_INFO,
autoWatch: false,
browsers: ['Chrome'],
singleRun: true,
proxies : {
'/src/': '/base/src/'
},
coverageReporter : {
reporters:[
{type:'json', subdir: '.', file: 'coverage-final.json'}
]
}
});
};
Спасибо!