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

442
Views
Servidor NodeJS Express: SyntaxError: token no válido o inesperado

Instalé TypeScript en mi proyecto y funciona bien en la interfaz. en el backend tengo un servidor express de nodo. Empecé a implementar TS allí. cuando ejecuté el servidor hace un momento falló con:

filename: (req: Request, file, cb) => {

SyntaxError: Invalid or unexpected token (apuntando a : )

¿Cómo puedo hacer que TS funcione en el servidor?

Instalé esm que me permite usar importaciones, también incluí: "module": "commonjs" en el paquete.json

¿Cómo puedo solucionar esto?

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Debe compilar TypeScript en JavaScript (por ejemplo, con tsc ) y luego ejecutar el JavaScript resultante con Node.js (que no tiene soporte nativo para TypeScript).

Alternativamente, mire ts-node .

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!