Makes sense. I tried that, but it didn't make a difference in this case. If
I fail to list a file in the files array of karma.conf.js, such as
angular-route.js, I still get a message like this when I run "karma start":


http://errors.angularjs.org/1.2.6/$injector/modulerr?p0=KarmaDemo&p1=Err
or%3A%20%5B%24injector%3Amodulerr%5D%20Failed%20to%20instantiate%20module%20ngRo
ute%20due%20to%3A%0AError%3A%20%5B%24injector%3Anomod%5D%20Module%20'ngRoute'%20
is%20not%20available!%20You%20either%20misspelled%20the%20module%20name%20or%20f
orgot%20to%20load%20it.%20If%20registering%20a%20module%20ensure%20that%20you%20
specify%20the%20dependencies%20as%20the%20second%20argument.%0Ahttp%3A%2F%2Ferro
rs.angularjs.org
%2F1.2.6%2F%24injector%2Fnomod%3Fp0%3DngRoute%0A%20%20%20%20at%2
0http%3A%2F%2Flocalhost%3A9876%2Fbase%2Flib%2Fangular.js%3F1388355407000%3A1528%
0A%20%20%20%20at%20ensure%20(http%3A%2F%2Flocalhost%3A9876%2Fbase%2Flib%2Fangula
r.js%3F1388355407000%3A1451)%0A%20%20%20%20at%20module%20(http%3A%2F%2Flocalhost
%3A9876%2Fbase%2Flib%2Fangular.js%3F1388355407000%3A1738)%0A%20%20%20%20at%20htt
p%3A%2F%2Flocalhost%3A9876%2Fbase%2Flib%2Fangular.js%3F1388355407000%3A3614%0Aht
tp%3A%2F%2Ferrors.angularjs.org
%2F1.2.6%2F%24injector%2Fmodulerr%3Fp0%3DngRoute%
26p1%3DError%253A%2520%255B%2524injector%253Anomod%255D%2520Module%2520'ngRoute'
%2520is%2520not%2520available!%2520You%2520either%2520misspelled%2520the%2520mod
ule%2520name%2520or%2520forgot%2520to%2520load%2520it.%2520If%2520registering%25
20a%2520module%2520ensure%2520that%2520you%2520specify%2520the%2520dependencies%
2520as%2520the%2520second%2520argument.%250Ahttp%253A%252F%252Ferrors.angularjs.
org%252F1.2.6%252F%2524injector%252Fnomod%253Fp0%253DngRoute%250A%2520%2520%2520
%2520at%2520http%253A%252F%252Flocalhost%253A9876%252Fbase%252Flib%252Fangular.j
s%253F1388355407000%253A1528%250A%2520%2520%2520%2520at%2520ensure%2520(http%253
A%252F%252Flocalhost%253A9876%252Fbase%252Flib%252Fangular.js%253F1388355407000%
253A1451)%250A%2520%2520%2520%2520at%2520module%2520(http%253A%252F%252Flocalhos
t%253A9876%252Fbase%252Flib%252Fangular.js%253F1388355407000%253A1738)%250A%2520
%2520%2520%2520at%2520http%253A%252F%252Flocalhost%253A9876%252Fbase%252Flib%252
Fangular.js%253F1388355407000%253A3614%0A%20%20%20%20at%20http%3A%2F%2Flocalhost
%3A9876%2Fbase%2Flib%2Fangular.js%3F1388355407000%3A3643


On Sun, Dec 29, 2013 at 4:06 PM, Jeff Hubbard <[email protected]> wrote:

> Don't use the minified version for unit testing, you'll get better error
> messages.
>
>
> On Sunday, December 29, 2013 1:27:52 PM UTC-8, Mark Volkmann wrote:
>>
>> When I get errors in Angular apps, it's not uncommon to see things like
>> below. This particular error occurs when running a Karma tests. I'm
>> wondering if it's on the roadmap to improve these messages. I'm still
>> trying to decipher this one. I know it's related to use of the ngRoute
>> module.
>>
>>         Error: [$injector:modulerr] http://errors.angularjs.org/1.
>> 2.6/$injector/
>> modulerr?p0=KarmaDemo&p1=Error%3A%20%5B%24injector%
>> 3Amodulerr%5D%20http%3A%2F%2F
>> errors.angularjs.org%2F1.2.6%2F%24injector%2Fmodulerr%3Fp0%
>> 3DngRoute%26p1%3DErro
>> r%253A%2520%255B%2524injector%253Anomod%255D%2520http%253A%
>> 252F%252Ferrors.angul
>> arjs.org%252F1.2.6%252F%2524injector%252Fnomod%253Fp0%
>> 253DngRoute%250A%2520%2520
>> %2520%2520at%2520http%253A%252F%252Flocalhost%253A9876%
>> 252Fbase%252Flib%252Fangu
>> lar.min.js%253F1388346740000%253A20%250A%2520%2520%2520%
>> 2520at%2520http%253A%252
>> F%252Flocalhost%253A9876%252Fbase%252Flib%252Fangular.
>> min.js%253F1388346740000%2
>> 53A21%250A%2520%2520%2520%2520at%2520http%253A%252F%
>> 252Flocalhost%253A9876%252Fb
>> ase%252Flib%252Fangular.min.js%253F1388346740000%253A29%
>> 0A%20%20%20%20at%20http%
>> 3A%2F%2Flocalhost%3A9876%2Fbase%2Flib%2Fangular.min.js%
>> 3F1388346740000%3A29
>>
>> --
>> R. Mark Volkmann
>> Object Computing, Inc.
>>
>  --
> You received this message because you are subscribed to the Google Groups
> "AngularJS" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/angular.
> For more options, visit https://groups.google.com/groups/opt_out.
>



-- 
R. Mark Volkmann
Object Computing, Inc.

-- 
You received this message because you are subscribed to the Google Groups 
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to