Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

Browser does not display the index.html pages as expected for any of the exercises

未关闭
#54 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
3/5
预计耗时
1-2 天
新手友好度
25/100
Issue 类型
缺陷
描述清晰度
需要澄清
活跃度
停滞
技术栈
javascript
领域
frontend, web-dev

调研方向

首先使用 Live Server 复现 exercise 03_02/index.html 的空白页面,然后检查其中的 script.js 和浏览器控制台。将该页面与日常背包应有的属性进行比较,并检查其他练习目录中是否也会出现相同的行为。当练习页面在受支持的浏览器中呈现预期输出时,即表示完成。

由索引模型根据 Issue 内容生成。

描述

Issue Overview

index.html files do not display in browser (chrome/saffari/ffx). I get a blank browser window.

Describe your environment

MacBook Pro 14" M2 Venture 13.2.1

Version: 1.75.1
Commit: 441438abd1ac652551dbe4d408dfcec8a499b8bf
Date: 2023-02-08T21:34:01.965Z
Electron: 19.1.9
Chromium: 102.0.5005.194
Node.js: 16.14.2
V8: 10.2.154.23-electron.0
OS: Darwin arm64 22.3.0
Sandboxed: No

LiveServer v5.7.9

Chrome Version 110.0.5481.177 (Official Build) (arm64)

Steps to Reproduce

  1. Select any exercise and right click on index.html e.g. exercise 03_02
  2. Select Open with Live Server
  3. Chrome opens (default browser) to http://127.0.0.1:5500/javascript-essential-training-2832077-main/03_02/index.html

Expected Behavior

I expect the browser to display everyday backpack properties in this case (exercise 03_02)

Current Behavior

Browser opens but displays no text (ie blank page)

Here is html from console:

<title>Building a JavaScript object from scratch</title> <script src="script.js" defer></script> <script> // = 0 ? '&' : '?') + '_cacheOverride=' + (new Date().valueOf()); } parent.appendChild(elem); } } var protocol = window.location.protocol === 'http:' ? 'ws://' : 'wss://'; var address = protocol + window.location.host + window.location.pathname + '/ws'; var socket = new WebSocket(address); socket.onmessage = function (msg) { if (msg.data == 'reload') window.location.reload(); else if (msg.data == 'refreshcss') refreshCSS(); }; if (sessionStorage && !sessionStorage.getItem('IsThisFirstTime_Log_From_LiveServer')) { console.log('Live reload enabled.'); sessionStorage.setItem('IsThisFirstTime_Log_From_LiveServer', true); } })(); } else { console.error('Upgrade your browser. This Browser is NOT supported WebSocket for Live-Reloading.'); } // ]]>

Possible Solution

Attempted to past URL in all browsers in both regular and incognito/private mode
Changed personal setting in live server to open in chromePrivateMode:

{
"liveServer.settings.donotShowInfoMsg": true,
"liveServer.settings.CustomBrowser": "chrome:PrivateMode"
}
(still openes in regular chrome/system browser though)

Screenshots / Video

image

Related Issues

主要语言
JavaScript
星标
2k
派生
4k
PR 合并指标
30 天内没有已合并 PR

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

LinkedInLearning/javascript-essential-training-2832077 的其他 Issue

查看 LinkedInLearning/javascript-essential-training-2832077 的全部 Issue

相似的 Issue

更多 JavaScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。