ts-node: Very slow start (with tsconfig.json)

I’m just trying TS and node. Use just:

// index.js
require('ts-node/register')

My server index.js starts about 2 minutes.

If I remove tsconfig.json from root (it can be even empty) server starts normally. What can be the reason for such behaviour?

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Comments: 21 (17 by maintainers)

Most upvoted comments

For people find this through google like me, I fixed ts-node starting slow by adding

"exclude": ["node_modules"]

to my tsconfig.json

I’m having same problem. But, when i remove experimentalDecorators": true property or change value to false, it comes fast! @blakeembrey

Yes, TypeScript is not Babel. It’s not possible to do because it needs to resolve files for compilation (Babel doesn’t have a type system so it doesn’t care what other files you have).

Babel-core/register works with no prob, should do something like them.