I have the following code in a file called server.js.
var http = require(\'http\'); http.createServer(function (request, response) { response.writeHead(200,
I was also running with same issue - while defining the path for windows use below parameter
Windows:
set NODE_PATH=C:\nodejs
OR
Set the environment variable for nodejs
NODE_PATH=C:\nodejs Path= C:\nodejs
(append the path contain this string “c:\nodejs”)