javascript - Error "failed to load resource (map)" when using cdnjs - Stack Overflow

I'm using some files from CDNJS:<linkhref=".5.2cssbootstrap.min.css"rel="styl

I'm using some files from CDNJS:

<link
  href=".5.2/css/bootstrap.min.css"
  rel="stylesheet"
/>
<link
  href=".14.0/css/all.min.css"
  rel="stylesheet"
  type="text/css"
/> 
[...] 
<script src=".5.1/jquery.slim.min.js"></script>
<script src=".5.2/js/bootstrap.bundle.min.js"></script>

When using this files I get some errors in the console (safari/MacOS):

[Error] Failed to load resource: the server responded with a status of 404 () (bootstrap.bundle.min.js.map, line 0)

[Error] Failed to load resource: the server responded with a status of 404 () (bootstrap.min.css.map, line 0)

I've found out maps are data about the files (is that correct?) Is it possible to fix this or is it a server error?

I'm using some files from CDNJS:

<link
  href="https://cdnjs.cloudflare./ajax/libs/twitter-bootstrap/4.5.2/css/bootstrap.min.css"
  rel="stylesheet"
/>
<link
  href="https://cdnjs.cloudflare./ajax/libs/font-awesome/5.14.0/css/all.min.css"
  rel="stylesheet"
  type="text/css"
/> 
[...] 
<script src="https://cdnjs.cloudflare./ajax/libs/jquery/3.5.1/jquery.slim.min.js"></script>
<script src="https://cdnjs.cloudflare./ajax/libs/twitter-bootstrap/4.5.2/js/bootstrap.bundle.min.js"></script>

When using this files I get some errors in the console (safari/MacOS):

[Error] Failed to load resource: the server responded with a status of 404 () (bootstrap.bundle.min.js.map, line 0)

[Error] Failed to load resource: the server responded with a status of 404 () (bootstrap.min.css.map, line 0)

I've found out maps are data about the files (is that correct?) Is it possible to fix this or is it a server error?

Share Improve this question asked Aug 30, 2020 at 12:23 MoPaMoMoPaMo 6848 silver badges27 bronze badges
Add a ment  | 

1 Answer 1

Reset to default 5

Your browser debugger detects minimized JavaScript and CSS and is looking for a map file automatically to normalize it, so it is easier to read. A map file is an instruction file for the browser to "unminify" a minimized JavaScript or CSS file, so that on client side, debugging will be easier, without impacting performance.

Normally getting this error won't effect anything. Actually this error is only thrown if the debugger is open, because the debugger itself caused it. Everything will work as expected anyway. You can ignore those errors.

For more information on how this works and how it's used for see "MDN: Use a source map".

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745633401a4637242.html

相关推荐

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信