0

我正在尝试在 Visual Studio 2015 中运行节点 js 项目,但如果我使用节点版本 6,则项目运行但我尝试版本 8,然后显示以下错误。

错误:-

(node:6600) [DEP0062] DeprecationWarning: `node --debug` and `node --debug-brk` are invalid. Please use `node --inspect` or `node --inspect-brk` instead.

server.js:-

var http = require('http');
var port = process.env.port || 1337;

http.createServer(function (req, res) {
    res.writeHead(200, { 'Content-Type': 'text/plain' });
   res.end('Hello World\n');

}).listen(port);
4

1 回答 1

0

安装visual studio 2017,然后使用node js 8版本...

于 2018-12-28T17:02:02.623 回答