angular.min.js.map not found, what is it exactly?

Angularjs

Angularjs Problem Overview


When I load the page and check chrome console i find these errors: enter image description here

what exactly are map files in angular?

I did reference the angular.min.js but not the angular.min.js.map. I am using the angular 1.2 rc release by the way and I just started seeing these errors when i switched to this release.

ERRORS:
GET http://localhost:44786/Scripts/angular-route.min.js.map 404 (Not Found)       :44786/Scripts/angular-route.min.js.map:1
GET http://localhost:44786/Scripts/angular-animate.min.js.map 404 (Not Found) :44786/Scripts/angular-animate.min.js.map:1
GET http://localhost:44786/Scripts/angular-resource.min.js.map 404 (Not Found) :44786/Scripts/angular-resource.min.js.map:1
GET http://localhost:44786/Scripts/angular.min.js.map 404 (Not Found) :44786/Scripts/angular.min.js.map:1

Angularjs Solutions


Solution 1 - Angularjs

As eaon21 and monkey said, source map files basically turn minified code into its unminified version for debugging.

You can find the .map files here. Just add them into the same directory as the minified js files and it'll stop complaining. The reason they get fetched is the

/*
//@ sourceMappingURL=angular.min.js.map
*/

at the end of angular.min.js. If you don't want to add the .map files you can remove those lines and it'll stop the fetch attempt, but if you plan on debugging it's always good to keep the source maps linked.

Solution 2 - Angularjs

Monkey is right, according to the link given by monkey

> Basically it's a way to map a combined/minified file back to an unbuilt state. When you build for production, along with minifying and combining your JavaScript files, you generate a source map which holds information about your original files. When you query a certain line and column number in your generated JavaScript you can do a lookup in the source map which returns the original location.

I am not sure if it is angular's fault that no map files were generated. But you can turn off source map files by unchecking this option in chrome console setting

enter image description here

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionraberanaView Question on Stackoverflow
Solution 1 - AngularjsJussi KosunenView Answer on Stackoverflow
Solution 2 - AngularjsraberanaView Answer on Stackoverflow