Karma error - Unknown provider: $$asyncCallbackProvider

后端 未结 3 595
天涯浪人
天涯浪人 2021-01-17 20:55

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

Error: [$injector:modulerr] Failed to instantiate module ngMock due to:
Error: [$injector:unp         


        
3条回答
  •  醉梦人生
    2021-01-17 21:24

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

提交回复
热议问题