Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

308
Views
Node.js installation was successful but, while running a test file it is showing an error

This is the error while I'm running from Node.js Command prompt:
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:
This is the error while I'm running from power shell or CMD

This is the code file:
This is the code file

This is the error file from power shell while command - "node myfirst.js":
This is the error file from power shell while command - "node myfirst.js"

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
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

To run your node.js script, type node <filename>, in your case: node ast.js.

The error https://i.stack.imgur.com/llqlm.png indicates that there's a port conflict, another process already uses 8080 port.

To fix it, kill the process who uses 8080 port, or just use another port:

var http = require('https');
http.createServer(function (req, res) {
res.writeHead(200, {'Content-Type': 'text/html'});
res.end('Hello World!');
}).listen(9999); // another port
about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!