throw new TypeError(`${relative(cwd, fileName)}: Emit skipped`) throw new TypeError(`${relative(cwd, fileName)}: Emit skipped`) typescript typescript

throw new TypeError(`${relative(cwd, fileName)}: Emit skipped`)


The solution was set this variable in tsconfig

"allowJs": false,


I had a similar problem but in my case, I needed allowJs to be set to true in tsconfig.json because I do have some auto-generated js-code in my codebase (pre-compiled validators for JSON Schema files) that I need to be included in the output.

The problem was indeed caused by JS files generated by incorrectly compiling TS files to JS files in the same directory. When I cleared my workspace the ts-node began to work properly with both TS files and those few auto-generated JS files.