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

Module 'ngLocale' is not available! is misleading #8174

Closed
mark0978 opened this issue Jul 13, 2014 · 19 comments
Closed

Module 'ngLocale' is not available! is misleading #8174

mark0978 opened this issue Jul 13, 2014 · 19 comments

Comments

@mark0978
Copy link
Contributor

I think John Papa covered it pretty well. This error message is deceptive and time wasting. If you are looking for module A, gripe about module A, not ngLocale!

http://www.johnpapa.net/easy-fix-to-a-common-angular-module-error/

@btford btford self-assigned this Jul 21, 2014
@btford btford added this to the Backlog milestone Jul 21, 2014
@btford btford removed the gh: issue label Aug 20, 2014
@johnpapa
Copy link
Contributor

johnpapa commented Sep 6, 2014

@btford I can no longer reproduce this, has it been fixed?

@siemiatj
Copy link

I just stumbled upon this this in a pieco of code that works flawlessly in Fx/Chrome/Opera/Safari but throws this error when loading my app in IE.

@pkozlowski-opensource
Copy link
Member

@mark0978 @siemiatj do you guys got a reproduce scenario for this one?

@mark0978
Copy link
Contributor Author

This one appears to be fixed now. The error message reflects the actual
missing code.

On Sun, Nov 23, 2014 at 8:40 AM, Pawel Kozlowski [email protected]
wrote:

@mark0978 https://github.com/mark0978 @siemiatj
https://github.com/siemiatj do you guys got a reproduce scenario for
this one?


Reply to this email directly or view it on GitHub
#8174 (comment).

@pkozlowski-opensource
Copy link
Member

@mark0978 cool, thnx for the info. Closing for now. If anyone bumps into a similar issue please open another ticket with a reproduce scenario. Thnx!

@adriatic
Copy link

I have a very reproducible case right now - it's the Miguel Castro's web application from Pluralsight's course "building-multi-client-end-to-end-soa-angular-edition-m12", where IE shows

Exception was thrown at line 1643, column 11 in http://localhost:46278/Scripts/angular.js
0x800a139e - JavaScript runtime error: [$injector:nomod] Module 'ngLocale' is not available! You either misspelled the module name or forgot to load it. If registering a module ensure that you specify the dependencies as the second argument.
http://errors.angularjs.org/1.2.18/$injector/nomod?p0=ngLocale

I am afraid to lose this by starting to trim the app

@pkozlowski-opensource
Copy link
Member

@adriatic ok, it looks like the pb is with AngularJS 1.2.18 - please try to narrow down the problem and check if it happens with the latest 1.2.x branch. If it does please open another issue. Thnx, we really do want to fix it (if not fixed already).

@mark0978
Copy link
Contributor Author

My testing was with 1.2.25 which no longer shows the issue.

On Mon, Nov 24, 2014 at 8:27 AM, Pawel Kozlowski [email protected]
wrote:

@adriatic https://github.com/adriatic ok, it looks like the pb is with
AngularJS 1.2.18 - please try to narrow down the problem and check if it
happens with the latest 1.2.x branch. If it does please open another issue.
Thnx, we really do want to fix it (if not fixed already).


Reply to this email directly or view it on GitHub
#8174 (comment).

@adriatic
Copy link

Pawel, I believe that I have the same problem with 1.2.27 version (which seems to be the last released version). Please send me email at nik at congral dot com so we can accelerate this "hunt"

@pkozlowski-opensource
Copy link
Member

@adriatic my e-mail is visible at GitHub but I would prefer this hunt to be happening in public so others can jump on and help as well.

@adriatic
Copy link

I understand Pawel's preference to conduct this process here at Github, so I will try to extract the minimum size sample that still runs into the same problem. As this could be elusive task, I was initially planning on inviting Pawel to debug my app in-situ, so with this option gone, please hang on as this may take some time (the app is a VS2013 app using MVC/WebApi/Entity Framework/MEF on the server side invoking "SPA silos" on the client side)

@adriatic
Copy link

I spent the whole day trying to extract a smaller subset of my app that still triggers the problem being discussed here, to no avail. So, I am leaving the complete reproducible sample in the form of Visual Studio solution in case that it may have some value in the future. Alternatively, I will also be happy to "host" Pawel on the server where this happens and offer the guide him through the debugging.

@adriatic
Copy link

@pkozlowski-opensource I believe that I found the most trivial sample that exhibits the issue 8174:

[$injector:nomod] Module 'ngLocale' is not available! You either misspelled the module name or forgot to load it.

Description of my setup:
Visual Studio 2013, with a single trivial project, consisting of the single HTML file shown below:

<!DOCTYPE html>
<html >
<head>
    <title>Issue 8174</title>
</head>
    <body>
        <script src="//ajax.googleapis.com/ajax/libs/angularjs/1.3.5/angular.js"></script>    
    </body>
</html>

Running this project, I specify to use Chrome Canary browser and set the breakpoint in Chrome at line 57 in Angular.js. Here is what I see:

image

Since AngularJS is a self-executing function, I would presume that this is a good enough proof that something is still fishy here.

@adriatic
Copy link

Using the Firefox debugger in the above described scenario, I got the call stack information

angularjs:57
angularjs:1747
angularjs:1671
angularjs:1745
angularjs:2146
angularjs:25909

I would appreciate to know whether this a red herring (meaning that the sample I created is somehow incomplete) or is that a real catch

@gkalpak
Copy link
Member

gkalpak commented Dec 12, 2014

Unfortunately, I don't think this is proof that something is fishy, since it is expected behaviour:
https://github.com/angular/bower-angular/blob/v1.3.5/angular.js#L2145-2149

The error must make it to the console :)

@adriatic
Copy link

In other words, "self-executing" just the angular.js module does not make sense - it is always expected that there ought to some "other stuff" present, right?
Either way, it means that I oversimplified my still present issue where this error does show up on the console. So, I am left with the choice to either learn enough about angular internals to I can debug my problem myself, or to continue extracting subsets of my app that would be acceptable as a reproducible cases for angular folks. I do not like either alternative as I would much prefer to work on my app :-)

@gkalpak
Copy link
Member

gkalpak commented Dec 12, 2014

Why not just post a full, non-minified stacktrace for start ?

@adriatic
Copy link

@gkalpak - I need to do some more work before I can do that. I was too much relying on the trivial sample posted 6 hours ago :-(

@arnjmllr
Copy link

In my case I was using the same name for a variable and a function! So I was able to submit my form once and then, if I tried to submit again, I got the error. I found this link which turned on the light for me: http://www.codeitive.com/0SSWjkqXkj/angularjs-ngclick-only-works-only-once-or-twice.html.

petebacondarwin added a commit to petebacondarwin/angular.js that referenced this issue Jul 16, 2015
Previously there was a custom built en-us locale that was included with
angular.js. This made likely that it would get out of sync with the real
en-us locale that is generated from the closure library.

This change removes that custom one and uses the generated one instead.
This also has the benefit of preventing the unwanted caught error on trying
to load `ngLocale` during angular bootstrap.

Closes angular#12134
Closes angular#8174
petebacondarwin added a commit to petebacondarwin/angular.js that referenced this issue Jul 16, 2015
Previously there was a custom built en-us locale that was included with
angular.js. This made likely that it would get out of sync with the real
en-us locale that is generated from the closure library.

This change removes that custom one and uses the generated one instead.
This also has the benefit of preventing the unwanted caught error on trying
to load `ngLocale` during angular bootstrap.

Closes angular#12134
Closes angular#8174
petebacondarwin added a commit to petebacondarwin/angular.js that referenced this issue Jul 16, 2015
Previously there was a custom built en-us locale that was included with
angular.js. This made likely that it would get out of sync with the real
en-us locale that is generated from the closure library.

This change removes that custom one and uses the generated one instead.
This also has the benefit of preventing the unwanted caught error on trying
to load `ngLocale` during angular bootstrap.

Closes angular#12134
Closes angular#8174
petebacondarwin added a commit to petebacondarwin/angular.js that referenced this issue Jul 16, 2015
Previously there was a custom built en-us locale that was included with
angular.js. This made likely that it would get out of sync with the real
en-us locale that is generated from the closure library.

This change removes that custom one and uses the generated one instead.
This also has the benefit of preventing the unwanted caught error on trying
to load `ngLocale` during angular bootstrap.

Closes angular#12134
Closes angular#8174
lgalfaso added a commit to lgalfaso/angular.js that referenced this issue Jul 29, 2015
Previously there was a custom built en-us locale that was included with
angular.js. This made likely that it would get out of sync with the real
en-us locale that is generated from the closure library.

This change removes that custom one and uses the generated one instead.
This also has the benefit of preventing the unwanted caught error on trying
to load `ngLocale` during angular bootstrap.

Closes angular#12134
Closes angular#8174
lgalfaso added a commit to lgalfaso/angular.js that referenced this issue Jul 29, 2015
Previously there was a custom built en-us locale that was included with
angular.js. This made likely that it would get out of sync with the real
en-us locale that is generated from the closure library.

This change removes that custom one and uses the generated one instead.
This also has the benefit of preventing the unwanted caught error on trying
to load `ngLocale` during angular bootstrap.

Closes angular#12134
Closes angular#8174
lgalfaso added a commit to lgalfaso/angular.js that referenced this issue Jul 29, 2015
Previously there was a custom built en-us locale that was included with
angular.js. This made likely that it would get out of sync with the real
en-us locale that is generated from the closure library.

This change removes that custom one and uses the generated one instead.
This also has the benefit of preventing the unwanted caught error on trying
to load `ngLocale` during angular bootstrap.

Closes angular#12134
Closes angular#8174
lgalfaso added a commit to lgalfaso/angular.js that referenced this issue Jul 29, 2015
Previously there was a custom built en-us locale that was included with
angular.js. This made likely that it would get out of sync with the real
en-us locale that is generated from the closure library.

This change removes that custom one and uses the generated one instead.
This also has the benefit of preventing the unwanted caught error on trying
to load `ngLocale` during angular bootstrap.

Closes angular#12134
Closes angular#8174
lgalfaso added a commit to lgalfaso/angular.js that referenced this issue Jul 29, 2015
Previously there was a custom built en-us locale that was included with
angular.js. This made likely that it would get out of sync with the real
en-us locale that is generated from the closure library.

This change removes that custom one and uses the generated one instead.
This also has the benefit of preventing the unwanted caught error on trying
to load `ngLocale` during angular bootstrap.

Closes angular#12134
Closes angular#8174
lgalfaso added a commit to lgalfaso/angular.js that referenced this issue Jul 29, 2015
Previously there was a custom built en-us locale that was included with
angular.js. This made likely that it would get out of sync with the real
en-us locale that is generated from the closure library.

This change removes that custom one and uses the generated one instead.
This also has the benefit of preventing the unwanted caught error on trying
to load `ngLocale` during angular bootstrap.

Closes angular#12134
Closes angular#8174
lgalfaso added a commit to lgalfaso/angular.js that referenced this issue Jul 29, 2015
Previously there was a custom built en-us locale that was included with
angular.js. This made likely that it would get out of sync with the real
en-us locale that is generated from the closure library.

This change removes that custom one and uses the generated one instead.
This also has the benefit of preventing the unwanted caught error on trying
to load `ngLocale` during angular bootstrap.

Closes angular#12134
Closes angular#8174
lgalfaso added a commit to lgalfaso/angular.js that referenced this issue Jul 29, 2015
Previously there was a custom built en-us locale that was included with
angular.js. This made likely that it would get out of sync with the real
en-us locale that is generated from the closure library.

This change removes that custom one and uses the generated one instead.
This also has the benefit of preventing the unwanted caught error on trying
to load `ngLocale` during angular bootstrap.

Closes angular#12134
Closes angular#8174
lgalfaso added a commit that referenced this issue Jul 31, 2015
Previously there was a custom built en-us locale that was included with
angular.js. This made likely that it would get out of sync with the real
en-us locale that is generated from the closure library.

This change removes that custom one and uses the generated one instead.
This also has the benefit of preventing the unwanted caught error on trying
to load `ngLocale` during angular bootstrap.

Closes #12462
Closes #12444
Closes #12134
Closes #8174
netman92 pushed a commit to netman92/angular.js that referenced this issue Aug 8, 2015
Previously there was a custom built en-us locale that was included with
angular.js. This made likely that it would get out of sync with the real
en-us locale that is generated from the closure library.

This change removes that custom one and uses the generated one instead.
This also has the benefit of preventing the unwanted caught error on trying
to load `ngLocale` during angular bootstrap.

Closes angular#12134
Closes angular#8174
netman92 pushed a commit to netman92/angular.js that referenced this issue Aug 8, 2015
Previously there was a custom built en-us locale that was included with
angular.js. This made likely that it would get out of sync with the real
en-us locale that is generated from the closure library.

This change removes that custom one and uses the generated one instead.
This also has the benefit of preventing the unwanted caught error on trying
to load `ngLocale` during angular bootstrap.

Closes angular#12462
Closes angular#12444
Closes angular#12134
Closes angular#8174
ggershoni pushed a commit to ggershoni/angular.js that referenced this issue Sep 29, 2015
Previously there was a custom built en-us locale that was included with
angular.js. This made likely that it would get out of sync with the real
en-us locale that is generated from the closure library.

This change removes that custom one and uses the generated one instead.
This also has the benefit of preventing the unwanted caught error on trying
to load `ngLocale` during angular bootstrap.

Closes angular#12134
Closes angular#8174
ggershoni pushed a commit to ggershoni/angular.js that referenced this issue Sep 29, 2015
Previously there was a custom built en-us locale that was included with
angular.js. This made likely that it would get out of sync with the real
en-us locale that is generated from the closure library.

This change removes that custom one and uses the generated one instead.
This also has the benefit of preventing the unwanted caught error on trying
to load `ngLocale` during angular bootstrap.

Closes angular#12462
Closes angular#12444
Closes angular#12134
Closes angular#8174
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

8 participants