Emit skipped when parsing config typescript files

Michael Ostrovsky picture Michael Ostrovsky · Sep 25, 2019 · Viewed 12k times · Source

I have a problem with the node-config library while using typescript.
My config folder is as follows:
enter image description here
However after I run tsc and try to start my app from it's entry point (app.js) I get the following error:
Error: Cannot parse config file: '..../config/development.ts': TypeError: config/development.ts: Emit skipped

When deleting the typescript files from that folder and keeping only the .js files it works. Anybody has an idea how I can solve this?

This is how my tsconfig looks:

 "target": "es6" 
 "module": "commonjs"
 "strict": true
 "esModuleInterop": true


Any help would be appreciated, thanks!

Answer

Joshua Goldstein picture Joshua Goldstein · Oct 30, 2019

TypeScript files outside of the project folder will produce an Emit skipped error. I can't tell if this is your issue because '..../config/' could be inside or outside the project. In my case, moving my configuration folder into my project worked around the bug. Blechy.

https://github.com/TypeStrong/ts-node/issues/693