Cannot start karma - no provider for jasmine
See original GitHub issueHey Guys:
I’m having an issue with getting karma running (on a non angularJS project) - I’ve installed all dependencies with npm and ran the karma init my.conf.js 2 times. When I try and run karma start my.conf.js, here’s the output:
/usr/local/lib/node_modules/karma/node_modules/di/lib/injector.js:9
throw error('No provider for "' + name + '"!');
^
Error: No provider for "framework:jasmine"! (Resolving: framework:jasmine)
at error (/usr/local/lib/node_modules/karma/node_modules/di/lib/injector.js:22:68)
at Object.parent.get (/usr/local/lib/node_modules/karma/node_modules/di/lib/injector.js:9:13)
at get (/usr/local/lib/node_modules/karma/node_modules/di/lib/injector.js:54:19)
at /usr/local/lib/node_modules/karma/lib/server.js:27:14
at Array.forEach (native)
at start (/usr/local/lib/node_modules/karma/lib/server.js:26:21)
at invoke (/usr/local/lib/node_modules/karma/node_modules/di/lib/injector.js:75:15)
at Object.exports.start (/usr/local/lib/node_modules/karma/lib/server.js:178:12)
at Object.<anonymous> (/usr/local/lib/node_modules/karma/bin/karma:19:39)
at Module._compile (module.js:449:26)
at Object.Module._extensions..js (module.js:467:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.runMain (module.js:492:10)
at process.startup.processNextTick.process._tickCallback (node.js:275:11)
I have karma-jasmine and karma-phantomjs-launcher in node_modules, is there something else that I’m doing wrong? What else can I check?
Thanks,
- Vann
Issue Analytics
- State:
- Created 10 years ago
- Comments:9 (2 by maintainers)
Top Results From Across the Web
Server start failed, No provider for "framework:jasmine"
What I tried: rm node_modules, npm i; clean npm cache, rm node_modules, npm i; npm remove -g karma (although was not installed -g) ......
Read more >angular 2 no providers in karma/jasmine testing
First I've searched for "No provider for Http", as the error was showing, but I've realised that I've imported http within ...
Read more >Karma - It follows you around!!
I could not start karma even after installing it globally. ... Server start failed on port 9876: Error: No provider for "framework:jasmine"!
Read more >No Provider for.. Angular 7, Jasmine + Karma issue
I'm using Angular 7, Jasmine + Karma and am getting errors when I run ng test against the project. I moved out my...
Read more >Angular 6: Using Karma for Unit Testing | Helmut's RAC / JEE ...
Code to be tested; Karma/Jasmine Test Code; Potential Error ... Error Datails: NullInjectorError: No provider for Router!
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I faced same error and tried to resolve for couple of hours.
Finally I figured out the issue. Which is “Karma module need to install LOCALLY not Globally” But you can have Karma-cli module can be installed globally.
@aleclarson remove property
plugins
(then karma will by default load all plugins from node_modules by patternkarma-*
) or add to itkarma-jasmine
.