因果报错-未知的提供程序:$$ asyncCallbackProvider [英] Karma error - Unknown provider: $$asyncCallbackProvider

查看:53
本文介绍了因果报错-未知的提供程序:$$ 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的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆