发布到托管站点后无法在 ASP.NET MVC 中加载源映射
failed to load source map in ASP.NET MVC after publish to hosting site
当我 运行 网站时,我在开发者工具上遇到了这个错误:
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
我检查了以下解决方案,但我无法解决我的问题,我需要更多解释:
我删除了 popper.min.js 和 aos.js 和 bootstrap.min.js
中的注释行
但我可能需要在我的项目中将地图源文件放在 js 文件夹和 css 文件夹下吗?
bootstrap.min.js.map
popper.min.js.map
aos.css.map
aos.js.map
我也找不到 google chrome 的源 windows 10 professional 的设置没有源 我找不到启用 javascript 源地图的源?
该错误也出现在 Microsoft edge 最新版本 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 文件夹的完整路径:
<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>
请问如何解决这个错误?
我从 github 站点复制粘贴文件内容
https://github.com/cdnjs/cdnjs/tree/master/ajax/libs/aos/2.1.1
但现在这些文件给出了另一个错误
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 站点路径的最佳方法是什么?
您可以从以下link下载丢失的文件,错误不会出现和隐藏。
从此 link 下载源代码,您将获得文件
bootstrap.min.js.map
https://getbootstrap.com/docs/4.3/getting-started/download/
也从这个
下载 aos.css.map 和 aos.js.map
https://www.cdnpkg.com/aos/file/aos.css.map/
从此 link 下载文件 popper.min.js.map
https://forgemia.inra.fr/genotoul-bioinfo/dgenies/blob/4c89661fba50d59fc12aeb41191fab4dd82e9216/js/popper.min.js.map
下载后将文件粘贴到 js folder
和 css folder
下。
当我 运行 网站时,我在开发者工具上遇到了这个错误:
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
我检查了以下解决方案,但我无法解决我的问题,我需要更多解释:
我删除了 popper.min.js 和 aos.js 和 bootstrap.min.js
中的注释行但我可能需要在我的项目中将地图源文件放在 js 文件夹和 css 文件夹下吗?
bootstrap.min.js.map
popper.min.js.map
aos.css.map
aos.js.map
我也找不到 google chrome 的源 windows 10 professional 的设置没有源 我找不到启用 javascript 源地图的源?
该错误也出现在 Microsoft edge 最新版本 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 文件夹的完整路径:
<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>
请问如何解决这个错误?
我从 github 站点复制粘贴文件内容
https://github.com/cdnjs/cdnjs/tree/master/ajax/libs/aos/2.1.1
但现在这些文件给出了另一个错误
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 站点路径的最佳方法是什么?
您可以从以下link下载丢失的文件,错误不会出现和隐藏。 从此 link 下载源代码,您将获得文件
bootstrap.min.js.map
https://getbootstrap.com/docs/4.3/getting-started/download/
也从这个
下载 aos.css.map 和 aos.js.maphttps://www.cdnpkg.com/aos/file/aos.css.map/
从此 link 下载文件 popper.min.js.map
https://forgemia.inra.fr/genotoul-bioinfo/dgenies/blob/4c89661fba50d59fc12aeb41191fab4dd82e9216/js/popper.min.js.map
下载后将文件粘贴到 js folder
和 css folder
下。