本文介绍了因果报错-未知的提供程序:$$ asyncCallbackProvider的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

尝试通过咕unt声运行我的业力测试,但出现错误:

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

我删除了"ngAnimate",但没有解决.如何在没有此错误的情况下运行grunt karma测试?

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

推荐答案

我现在遇到了同样的问题,并通过确保我的angular-mock依赖版本与该角度相同来解决此问题.

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.

您可以在bower.json文件中执行此操作(将"angular-mocks":〜1.3.0"更改为"angular-mocks":"^ 1.3.0"或特定版本).

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).

这篇关于因果报错-未知的提供程序:$$ asyncCallbackProvider的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-06 21:53