发布到托管站点后无法在ASP.NET MVC中加载源映射 [英] failed to load source map in ASP.NET MVC after publish to hosting site

查看:134
本文介绍了发布到托管站点后无法在ASP.NET MVC中加载源映射的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我运行网站时,在开发人员工具上出现此错误:

When i run the website i got this error on developer tools :

JQMIGRATE: Migrate is installed, version 3.0.1
DevTools failed to load SourceMap: Could not load content for http://aljawd.com/Contents/css/aos.css.map: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE
DevTools failed to load SourceMap: Could not load content for http://aljawd.com/Contents/css/bootstrap-datepicker.css.map: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE
DevTools failed to load SourceMap: Could not load content for http://aljawd.com/Contents/js/aos.js.map: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE
DevTools failed to load SourceMap: Could not load content for http://aljawd.com/Contents/js/popper.min.js.map: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE
DevTools failed to load SourceMap: Could not load content for http://aljawd/Contents/js/bootstrap.min.js.map: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE

我检查了以下解决方案,但我无法解决问题,请进一步说明:

I checked the following solutions but i cannot solve my issue , i need more explain please :

我删除了popper.min.js和aos.js和bootstrap.min.js中的注释行

I removed the commented line in popper.min.js and aos.js and bootstrap.min.js

但是我是否需要在我的项目中将地图源文件放在js文件夹和css文件夹下?

but may i need to have the map source files in my project under js folder and css folder ?

bootstrap.min.js.map

bootstrap.min.js.map

popper.min.js.map

popper.min.js.map

aos.css.map

aos.css.map

aos.js.map

aos.js.map

我也无法在设置下找到google chrome的源Windows 10专业版没有源我找不到源来启用javascript源地图?

Also i cannot find the source for google chrome under settings no source for windows 10 professional i cannot find the source to enable javascript source map ?

该错误也出现在Windows 10的Microsoft Edge最新版本中:

The error also appear on Microsoft edge last version for windows 10 :

JQMIGRATE: Migrate is installed, version 3.0.1
popper.min.js:5 Uncaught ReferenceError: popper is not defined
    at popper.min.js:5
bootstrap.min.js:7 Uncaught TypeError: Cannot read property 'js' of undefined
    at bootstrap.min.js:7
aos.js:2 Uncaught ReferenceError: aos is not defined
    at aos.js:2

这是css和js文件夹的完整路径:

this is the complete path for css and js folder :

<link href="https://fonts.googleapis.com/css?family=Oswald:400,700|Work+Sans:300,400,700" rel="stylesheet">
<link rel="stylesheet" href=@Url.Content("/Contents/fonts/icomoon/style.css")>
<link rel="stylesheet" href=@Url.Content("/Contents/css/bootstrap.min.css")>
<link rel="stylesheet" href=@Url.Content("/Contents/css/magnific-popup.css")>
<link rel="stylesheet" href=@Url.Content("/Contents/css/jquery-ui.css")>
<link rel="stylesheet" href=@Url.Content("/Contents/css/owl.carousel.min.css")>
<link rel="stylesheet" href=@Url.Content("/Contents/css/owl.theme.default.min.css")>
<link rel="stylesheet" href=@Url.Content("/Contents/css/bootstrap-datepicker.css")>
<link rel="stylesheet" href=@Url.Content("/Contents/css/animate.css")>

<link rel="stylesheet" href=@Url.Content("/Contents/fonts/flaticon/font/flaticon.css")>

<link rel="stylesheet" href=@Url.Content("/Contents/css/aos.css")>
<link rel="stylesheet" href=@Url.Content("/Contents/css/style.css")>

<script src=@Url.Content("/Contents/js/jquery-3.3.1.min.js")></script>
        <script src=@Url.Content("/Contents/js/jquery-migrate-3.0.1.min.js")></script>
        <script src=@Url.Content("/Contents/js/jquery-ui.js")></script>
        <script src=@Url.Content("/Contents/js/popper.min.js")></script>
        <script src=@Url.Content("/Contents/js/bootstrap.min.js")></script>
        <script src=@Url.Content("/Contents/js/owl.carousel.min.js")></script>
        <script src=@Url.Content("/Contents/js/jquery.stellar.min.js")></script>
        <script src=@Url.Content("/Contents/js/jquery.waypoints.min.js")></script>
        <script src=@Url.Content("/Contents/js/jquery.animateNumber.min.js")></script>
        <script src=@Url.Content("/Contents/js/aos.js")></script>
        <script src=@Url.Content("/Contents/js/main.js")></script>

请问如何解决这个错误?

How to solve this error please ?

我从github网站复制粘贴文件内容

I copy paste file contents from github site

https://github.com/cdnjs/cdnjs/tree/master/ajax/libs/aos/2.1.1

但是现在这些文件给出了另一个错误

but now these files give another error

DevTools failed to load SourceMap: Could not parse content for http://localhost:2674/Contents/css/aos.css.map: Unexpected token  in JSON at position 0
DevTools failed to load SourceMap: Could not parse content for http://localhost:2674/Contents/js/aos.js.map: Unexpected token  in JSON at position 0
DevTools failed to load SourceMap: Could not parse content for http://localhost:2674/Contents/js/bootstrap.min.js.map: Unexpected token  in JSON at position 0

从我的项目中读取js和CSS文件路径或使用CDN站点路径的最佳方法是什么?

what is the best way to read the js and css file path from my project or use the cdn site path ?

推荐答案

您可以从以下链接下载丢失的文件,并且不会显示和隐藏错误. 从此链接下载源代码,您将获得文件

you can download the missing files from the following links and errors will not appear and hide. Download source from this link and you will get the file

bootstrap.min.js.map

bootstrap.min.js.map

https://getbootstrap.com/docs/4.3/getting-started/download/  

还从此

https://www.cdnpkg.com/aos/file/aos.css.map/  

从此链接下载文件popper.min.js.map

download file popper.min.js.map from this link

https://forgemia.inra.fr/genotoul-bioinfo/dgenies/blob/4c89661fba50d59fc12aeb41191fab4dd82e9216/js/popper.min.js.map 

下载后,将文件粘贴到js foldercss folder下.

after download paste the files under js folder and css folder .

这篇关于发布到托管站点后无法在ASP.NET MVC中加载源映射的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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