该网站在 Firefox 中运行良好,但在 chrome 中查看时,我收到以下错误消息
styles.7c3fd40….css:1 Failed to load resource: net::ERR_NAME_NOT_RESOLVED
runtime.2620947….js:1 Failed to load resource: net::ERR_NAME_NOT_RESOLVED
polyfills.bebee6a….js:1 Failed to load resource: net::ERR_NAME_NOT_RESOLVED
main.700130d….js:1 Failed to load resource: net::ERR_NAME_NOT_RESOLVED
%3Cultan-kearns%3E.g…earns/favicon.ico:1 Failed to load resource: net::ERR_NAME_NOT_RESOLVED
抱歉,如果这是一个愚蠢的问题,我还没有过多地使用带有 angular 的 github 页面。
有问题的网站是:https : //ultan-kearns.github.io/ultankearns/
我曾尝试在 Opera 和 Edge 中运行该站点,但遇到了相同的错误,并且我多次尝试重新部署该站点,但我陷入了困境。提前感谢大家。
请检查您base href
的index.html
文件:
<base href="https://<ultan-kearns>.github.io/ultankearns/">
应该是这样的:
<base href="https://ultan-kearns.github.io/ultankearns/">
这个代码块应该在你的 head 标签内,
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.0/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.0/jquery.min.js"></script>
<link href="https://fonts.googleapis.com/css?family=Oswald&display=swap" rel="stylesheet">
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.0/js/bootstrap.min.js"></script>
你的 html 文件看起来应该是这样的:
<!doctype html>
<head>
<meta charset="utf-8">
<title>Website</title>
<base href="https://ultan-kearns.github.io/ultankearns/">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="icon" type="image/x-icon" href="favicon.ico">
<link rel="stylesheet" href="styles.7c3fd40d0bab5f41ea0e.css">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.0/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.0/jquery.min.js"></script>
<link href="https://fonts.googleapis.com/css?family=Oswald&display=swap" rel="stylesheet">
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.0/js/bootstrap.min.js"></script>
</head>
<body>
<app-root></app-root>
<script type="text/javascript" src="runtime.26209474bfa8dc87a77c.js"></script>
<script type="text/javascript" src="polyfills.bebee6a5ef0ece001bc6.js"></script>
<script type="text/javascript" src="main.700130d31064f7530e56.js"></script>
</body>
</html>
请将此与您的进行比较
index.html
并将其替换为您的并将其上传到 gitgub 它将起作用。
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句