Running node.js code just displays a node identifier

前端 未结 9 2182
爱一瞬间的悲伤
爱一瞬间的悲伤 2021-02-19 19:07

I have the following code in a file called server.js.

var http = require(\'http\');

http.createServer(function (request, response) {
  response.writeHead(200,          


        
9条回答
  •  星月不相逢
    2021-02-19 19:56

    I faced the same problem and simply changed the the name of node.exe file from Harvest. This hasn't broken anything from Harvest and I can keep working with it.

    Change the Harvest's command name to node_.exe:

    ren "C:\Program Files (x86)\CA\SharedComponents\PEC\bin\node.exe" "C:\Program Files (x86)\CA\SharedComponents\PEC\bin\node_.exe"
    

提交回复
热议问题