Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

294
Vistas
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 Respuestas
Responde la pregunta

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 Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda