The '@angular-devkit/build-angular/plugins/karma' karma plugin is meant to be used from within Angular CLI and will not work correctly outside of it

Viewed 3243

When i am trying to config and run the .sh file in local environment, getting this error:

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 of it.

I tried to use CLI but its not worked for me.

Please help me to resolve this issue.

The following file I have created to execute karma.

run_unit_test.sh

./node_modules/karma/bin/karma start src/karma.conf.js

2 Answers

I got this error in my WebStorm and I noticed that in

Run/Debug ConfigurationsKarma package input, was wrong package path - path_to_project/node_modules/karma

Error gone when I set it to: path_to_project/node_modules/@angular/cli

I know that I'm late with this answer and that this doesn't quite fit your situation. But I know that people with a similar problem often get here and I will leave this post for them.

Related