无法在版本8中运行Node js项目

时间:2018-12-27 06:33:26

标签: node.js asp.net-mvc-4

我正在尝试在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);

1 个答案:

答案 0 :(得分:0)

安装Visual Studio 2017然后使用Node js 8版本...

相关问题