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

301
Views
tsc not compiling all js files

I'm having an issue compiling all the typescript files + javascript files into javascript files. it's not compiling all the javascript files to the dist folder.

here is the command I run: rm -rf ./dist && tsc -p . && node ./dist/server.js

and I get this error: Unhandled rejection Error: Cannot find module './email-service' then I went to the folder email-service and I can't find the index.js file in there, it wasn't compiled.

here is my tsconfig file:

{
    "compilerOptions": {
        "outDir": "./dist",                    
        "rootDir": ".",                          
        "module": "commonjs",                   
        "target": "es6",                        
        "lib": ["dom", "es6"],                   
        "sourceMap": true,                 
        "checkJs": false,                      
        "allowJs": true,                         
        "moduleResolution": "node",          
        "noEmit": false,                         
        "baseUrl": "./src",                      
        "strict": true,                          
        "esModuleInterop": true,                
        "resolveJsonModule": true,               
        "isolatedModules": true,                  
        "importHelpers": true,                   
        "declaration": true,                      
        "strictPropertyInitialization": false,    
        "alwaysStrict": true,                  
        "paths": {                                
            "~/*": ["*"]
        },
    },
    "include": [ "*.js", "*.ts", "*.json"],      
    "exclude": ["node_modules", "dist"]    
}

node version: 10.16.1

Folder Structure :

.
├── tsconfig.json
├── _src
│   └──_ email-service
│      └── index.js (missing)
├── _dist
│   └──_src
│      └──_ email-service
│         └── index.js


any idea whats the issue?

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!