This is the error while I’m running from Node.js Command prompt
This is the error while I’m running from power shell or CMD
Code:
var http = require('https');
http.createServer(function (req, res) {
res.writeHead(200, {'Content-Type': 'text/html'});
res.end('Hello World!');
}).listen(8080);
Error:
asd.js : The term 'asd.js' is not recognized as the name of a cmdlet, function, script file,
or operable program.
Check the spelling of the name, or if a path was included, verify that the path is correct and
try again.
At line:1 char:1
+ asd.js
+ ~~~~~~
+ Category Info : ObjectNotFound: (asd.js:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException