错误'找不到jquery-2.0.2.min.map' [英] Error 'jquery-2.0.2.min.map not found'

查看:102
本文介绍了错误'找不到jquery-2.0.2.min.map'的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Google Chrome开发人员工具中遇到此错误:

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

找不到jquery-2.0.2.min.map

jquery-2.0.2.min.map not found

我找到了一种方法,可以从我的jquery-2.0.2.min.js中删除此行:

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?

显然,这不是仅与 jQuery 2.0.2有关的问题.一个非常相似的,有很好解释的Stack Overflow问题是 jQuery的jquery-1.10.2.min.map触发了404(找不到) .我希望这可以为情况提供一些启示.

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. 下载地图文件和jquery的未压缩版本.放上缩小版.

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

2.在您的HTML中包含缩小的版本

3.签入Chrome

4.阅读 JavaScript源地图简介

4. Read Introduction to JavaScript Source Maps

5.熟悉调试JavaScript

5. Get familiar with Debugging JavaScript

这篇关于错误'找不到jquery-2.0.2.min.map'的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆