【问题标题】:How to run html file on port 8080 through vs code如何通过vs代码在8080端口运行html文件
【发布时间】:2022-11-12 01:20:49
【问题描述】:

我正在尝试通过命令“http-server”在端口 8080 上运行我的 html 文件,但终端一直说“找不到命令”。

我尝试通过“npx http-server”和“npm install -g http-server”解决这个问题,但后来我被告知也找不到“npx”和“npm”命令。

【问题讨论】:

  • 您是否安装了node.js
  • 安装this 扩展。然后,您可以右键单击 HTML 文件并单击“打开 Live Server”。

标签: html visual-studio-code


【解决方案1】:

您好朋友,请确保您正确安装 node js,也许这篇文章会有所帮助

https://linuxhint.com/npm-command-not-found/

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2022-08-11
    • 2019-08-07
    • 1970-01-01
    • 1970-01-01
    • 2021-01-31
    • 1970-01-01
    • 2022-07-22
    • 2021-12-26
    相关资源
    最近更新 更多