Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

212
Visualizações
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 Respostas
Responde à pergunta

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda