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

290
Visualizações
Typescript Uncaught ReferenceError: exports is not defined

I'm having trouble figuring out what this error means but i'm sure it can be resolved with another "easy hack"..... As everything lately to do with web tech stacks seems to be fixed with another little "easy hack".......

Getting this error for some dumb reason i'm sure.

Uncaught ReferenceError: exports is not defined

at app.js:2

(anonymous) @ app.js:2

all i did was export a function to test typescript out.

core/CoreTest.ts

export function testFunction () : void {

console.log("This is a core test");

}

and then i called it here...

app.ts

import { testFunction } from './core/CoreTest.js';

testFunction();
about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

posted this question around on multiple sites. to the credit of this individual i was able to fix my problem. https://www.reddit.com/r/typescript/comments/s5vqpj/uncaught_referenceerror_exports_is_not_defined/ht0s9x4/?context=3

Solution change from commonjs to es6 in tsconfig.json

"module": "commonjs"

"module": "es6"

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