Reputation: 3578
I've just downloaded a fresh copy of angular.min.js, and I'm getting a 404 on angular.min.js.map, which I'm not including in my code:
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" type="text/css" href="css/bootstrap.min.css" />
</head>
<body>
<script type="text/javascript" src="js/angular.min.js"></script>
</body>
</html>
The error in Chrome:
GET http://angular.dev/js/angular.min.js.map 404 (Not Found)
Upvotes: 4
Views: 14778
Reputation: 817
I read somewhere source map files basically turn minified code into its un-minified version for debugging purpose.
You can get rid of this error {angular.min.js.map 404 (Not Found)} message by following anyone below :-
First way
1.You just have to find the same .map file for angular.min.js which you have included.
(eg. For angularJs minified version 1.5.6 .map files can be downloaded from Here )
Just copy-paste them to the same directory where you have uploaded your minified js files and it'll stop complaining.
The reason they get fetched is the below line which you can find when you open the angular.min.js file.
//# sourceMappingURL=angular.min.js.map
which can be found at the end of the angular.min.js file.
Second way
Upvotes: 0
Reputation: 803
Open the angular.min.js file in a text editor. There will be a comment at the end like this:
//# sourceMappingURL=angular.min.js.map
Delete that and the error will disappear.
A map file facilitates regenerating the minified version of a script based on changes to a non-minified version. Since you won't be making changes to angular.js, you don't need the map.
Upvotes: 6