2.0.2.min.map not found'

I'm getting this error in Google Chrome developer tools:

jquery-2.0.2.min.map not found

I found a way to get rid of it by removing this line from my jquery-2.0.2.min.js :

//@ sourceMappingURL=jquery-2.0.2.min.map

However, I don't believe this was a good idea, since this may be just a temporary fix that may be a problem in the future. Since I don't really understand the nature of this error and the goofy solution: what's causing this error and is there a better fix for it?

Apparently, this is not a question related to jQuery 2.0.2 only. A very similar Stack Overflow question with a great explanation is jQuery's jquery-1.10.2.min.map is triggering a 404 (Not Found). I hope this will shed some light on the situation.


1. Download the map file and uncompressed version of jquery. Put them with minified version.

2. Include minified version into your HTML

3. Check in Chrome 铬

4. Read Introduction to JavaScript Source Maps

5. Get familiar with Debugging JavaScript


You should have a file included in your download of jquery-2.0.2 called jquery-2.0.2.min.map make sure it is in the same location as jquery-2.0.2.min.js and you should be good to go.

If you don't have a copy you can download it here: http://code.jquery.com/jquery-2.0.2.min.map

Some more background about this from the jQuery website.

Starting with jQuery 1.9, we also make available sourcemap files that can be used to debug the compressed file in sourcemap-aware browsers such as Google Chrome. The map file is not required for users to run jQuery, it just improves the developer's debugger experience.


As it is announced in jQuery 1.11.0/2.1.0 Beta 2 Released the source map comment will be removed so the issue will not appear in newer versions of jQuery .

Anyway, if you need to use a source map, it still be available:

We'll still be generating and distributing sourcemaps, but you will need to add the appropriate sourcemap comment at the end of the minified file if the browser does not support manually associating map files (currently, none do). If you generate your own jQuery file using the custom build process, the sourcemap comment will be present in the minified file and the map is generated; you can either leave it in and use sourcemaps or edit it out and ignore the map file entirely.

Here you find more details about the changes.

链接地址: http://www.djcxy.com/p/83440.html

上一篇: 如何定位页面上的所有输入?

下一篇: 未找到2.0.2.min.map'