Skip to content
This repository has been archived by the owner on Apr 12, 2024. It is now read-only.

Failed to instantiate module ngMock on latest build (1.2.14-build.2320+sha.1b1413a) #6439

Closed
bernardeli opened this issue Feb 25, 2014 · 5 comments

Comments

@bernardeli
Copy link

I believe something has gone wrong after I put in place the latest build.

All my karma tests are failing with:

Error: [$injector:modulerr] Failed to instantiate module ngMock due to:
Error: [$injector:unpr] Unknown provider: $$rAFProvider
http://errors.angularjs.org/1.2.3/$injector/unpr?p0=%24%24rAFProvider

I really wanted to fix it myself and dive into the code more often but I'm not familiar with angular code base yet.

The closest PR that touches on $rAF I could find is 4c4537e

Really appreciate the hard work guys.

@pkozlowski-opensource
Copy link
Member

@bernardeli do you have a reproduce scenario available anywhere (ideally a plunk)? I suspect a mix of mocks / angular code from different versions. So this brieffly on my machine today, would like to dig into this one.

@IgorMinar
Copy link
Contributor

@bernardeli thanks for reporting the issue in the unreleased version of angular! You must be one of the first non-google people to do that. Awesome!

Unfortunately in this case I believe that you are using a mix of v1.2.3 build artifacts with bits from 1.2.14 pre-release bits. Please make sure that all of your angular core modules are at the same version. If I'm wrong, please open a new issue and provide more information about your environment.

@andrejkaurin
Copy link

I run into same problem and as Igor answered I just had to ensure that angular-mocks.js (and other modules) are same version as angular.js.

@jofan
Copy link

jofan commented Apr 2, 2014

I'm having this issue as well and I can see in my Karma runner I reference angular-test.js file which is version 1.2.6. Problem is I can't find a more resent version of this file. Has it been replaced with something else (have googled but without success)?

Hehe, never mind. Probably created that file myself. Replacing it with latest version of Angular solved it.

@IgorMinar
Copy link
Contributor

right, we don't ship angular-test.js

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants