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

289
Views
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 answers
Answer question

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 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!