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

163
Views
Why can't I use the typescript transpiled javascript code

I am learning TypeScript and the code that I transpiler cannot use because of an error in the html, it is this:

Error in console

I'm trying to use transpiled code on my html

html:

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    
</body>
<script type="module" src="./dist/app.js"></script>
</html>

my directory:

Directory

package.json:

{
  "name": "ts",
  "version": "1.0.0",
  "description": "",
  "main": "index.js",
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1"
  },
  "author": "",
  "license": "MIT"
}

tsconfig.json:

{
  "compilerOptions": {
    "target": "es5", 
     "moduleResolution": "classic",                       
     "outDir": "./dist",  
    "esModuleInterop": true,                             
    "forceConsistentCasingInFileNames": true,          
    "strict": true,                                    
    "skipLibCheck": true                               
  }
}

As you can see is very simple but I don't really understand why I can't, I search for a time and I saw something about module loaders, and build tools, but I don't catch it, and I don't know how implement them.

about 4 years ago · Juan Pablo Isaza
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!