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

229
Views
SyntaxError no capturado: token inesperado '<' error

Traté de ejecutar mi aplicación en localhost usando nodejs pero sigo recibiendo este error: Uncaught SyntaxError: Unexpected token '<' .

Este es mi código app.js:

 const http = require('http') const fs = require('fs') const port = 3000 const server = http.createServer(function(req,res){ res.writeHead(200,{'Content-Type':'text/html'}) fs.readFile('templates/index.html',null,function(error,data){ if(error){ res.writeHead(404) res.write('Error: File Not Found') } else { res.write(data) } res.end() }) }) server.listen(port,function(error){ if(error){ console.log('something went wrong', error) }else{ console.log('server is listening on port ' + port) } })

Traté de buscar en otros hilos que discutieron esto, pero soy bastante nuevo en esto y no tengo ni idea de lo que están hablando, solo sigo los tutoriales de YouTube en este momento.

about 4 years ago · Juan Pablo Isaza
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!