Base solution for your next web application

Activities of "CLIT"

when doing build, using "npm run publish" command facing error

Similarly while running the project also facing issue

See attached screenshots

Project Version Details:

  • ASP.NET Core + Angular

Version: v8.1.0

Hi Team,

Failing to Crome browser open while running test case even after two attempts & just giving up, no test cases are picked during execution time & also coverage is not generated.

Getting below error: 09 03 2023 13:09:34.690: ERROR [karma-server]: Server start failed on port 9876: Error: The '@angular-devkit/build-angular/plugins/karma' karma plugin is meant to be used from within Angular CLI and will not work correctly outside.

09 03 2023 13:21:27.204 ERROR [karma-server]: UnhandledRejection

Project Version Details: * ASP.NET Core + Angular

  • Version: v8.1.0

Not sure if it's because any package needs to be updated? or I am missing some configuration. Please help me with the same.

Below is Angular.js configuration "devDependencies": { ** "@angular-devkit/build-angular": "~0.901.0",** "@angular/cli": "^9.1.0", "@angular/compiler-cli": "^9.1.0", "@angularclass/hmr": "^2.1.3", "@angularclass/hmr-loader": "^3.0.4", "@types/jasmine": "~3.5.10", "@types/jasminewd2": "^2.0.8", "@types/jspdf": "^1.3.3", "@types/lodash": "^4.14.149", "@types/moment-timezone": "^0.5.13", "@types/node": "^13.9.5", "codelyzer": "^5.2.2", "devextreme-cldr-data": "^1.0.3", "globalize": "^1.6.0", "gulp": "^4.0.1", "gulp-clean-css": "^4.3.0", "gulp-concat": "^2.6.1", "gulp-less": "^4.0.1", "gulp-postcss": "^8.0.0", "gulp-uglify": "^3.0.2", "jasmine-core": "~3.5.0", "jasmine-spec-reporter": "^5.0.1", "karma": "^4.4.1", "karma-chrome-launcher": "~3.1.0", "karma-cli": "~2.0.0", "karma-coverage-istanbul-reporter": "^2.1.1", "karma-jasmine": "~3.1.1", "karma-jasmine-html-reporter": "^1.5.3", "merge-stream": "^2.0.0", "nswag": "13.3.0", "postcss-url": "^9.0.0", "protractor": "~5.4.3", "ts-node": "~8.8.1", "tslint": "~6.1.0", "typescript": "3.8.3"

Below is Karma.config.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', '@angular-devkit/build-angular'], plugins: [ require('karma-jasmine'), require('karma-chrome-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 }, files: [

],
preprocessors: {
  
},
mime: {
  'text/x-typescript': ['ts','tsx']
},
coverageIstanbulReporter: {
  dir: require('path').join(__dirname, 'coverage'), reports: [ 'html', 'lcovonly' ],
  fixWebpackSourcePaths: true
},
angularCli: {
  environment: 'dev'
},
reporters: config.angularCli && config.angularCli.codeCoverage
          ? ['progress', 'coverage-istanbul']
          : ['progress', 'kjhtml'],
port: 9876,
colors: true,
logLevel: config.LOG_INFO,
autoWatch: true,
browsers: ['Chrome'],
singleRun: false

}); };

Thanks CL-IT

Showing 1 to 2 of 2 entries