【发布时间】:2025-12-28 14:25:16
【问题描述】:
我是节点新手。我已经安装了nosejs 版本v12.4.0、npm 6.9.0、http-server 0.11.1 和Visual Studio 代码。我想用我的http-server 打开我的hello word 项目,它是在 Visual Studio 代码中。但我收到以下错误
错误
[2019-06-21T05:20:18.280Z] "GET /" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/64.0.3282.140 Safari/537.36 Edge /18.17763" (node:11596) [DEP0066] DeprecationWarning: OutgoingMessage.prototype._headers 已弃用
我尝试 npm install node-gyp 来修复标头问题,但没有成功。
我也尝试使用不同的浏览器,例如。 chrome, firefox , 探索但没有成功。
<!DOCTYPE html>
<html>
<head>
</head>
<body>
<h1> Hello Word </h1>
</body>
</html>
我希望在任何浏览器中都能看到“Hello Word”。我使用的是 Windows 10。请协助
【问题讨论】:
标签: node.js windows http-headers