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

221
Views
Should we build typescript into js when uploading to server?

We are always using nodejs and we write code using vanilla JavaScript (.js extension). It's working fine, but currently we decided to create nodejs app using typescript. Unfortunately, we encounter many errors in building it (ts -> js). It is require .js code to run in the server? or just upload typescript files then run it in server using ts-node?

Thanks for your feedback.

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

0

Unfortunately, we encounter many errors in building it (ts -> js).

If they're errors in the code (TypeScript-related or otherwise), you need to resolve those before trying to use it in production.

It is require .js code to run in the server?

Node.js is a JavaScript runtime, it doesn't understand TypeScript.

You can:

  • Compile your TypeScript to JavaScript before deploying; or
  • Use ts-node or similar to compile it just-in-time; or
  • Use a different runtime, like Deno which handles TypeScript directly (basically by compiling just-in-time).

Note that when using one of the just-in-time options, it's really important to ensure that the code compiles cleanly by compiling it during development and staging. Your production environment shouldn't be the first place a TypeScript compilation error shows up.

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!