Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Karma error - Unknown provider: $$asyncCallbackProvider

Trying to run my karma test through grunt but getting an error:

Error: [$injector:modulerr] Failed to instantiate module ngMock due to:
Error: [$injector:unpr] Unknown provider: $$asyncCallbackProvider

I removed 'ngAnimate' but does not resolve it. How can I run the grunt karma test without this error?

like image 713
Leeuwtje Avatar asked Aug 05 '15 12:08

Leeuwtje


2 Answers

While I have no doubt that 3sdmx's answer would work, I just ran an NPM update and that worked. Thought I should mention that so that people aren't maintaining their .json files so closely.

like image 182
vbullinger Avatar answered Nov 11 '22 15:11

vbullinger


I had the same problem just now, and fixed it by making sure the version of my angular-mock dependancy was the same as that angular.

You can do this in your bower.json file (change "angular-mocks": "~1.3.0" to "angular-mocks": "^1.3.0" or a specific version).

like image 20
3sdmx Avatar answered Nov 11 '22 15:11

3sdmx