Reputation: 2208
But tsc && node -r esm .
and nodemon -e ts -x 'tsc && node -r esm .'
works OK.
Everything that I locally imported seems to be undefined with ts-node
and I have tried madge
and detect-circular-deps
and they could not find a problem...
Real project -- https://github.com/patarapolw/rep2recall-web/blob/91e6f6a5870dca52010b4e569d4bb81f7c5be78f/package.json#L92 and https://github.com/patarapolw/rep2recall-web/blob/master/src/backend/server.ts
Upvotes: 1
Views: 2127
Reputation: 853
Use tsconfig-paths like this:
ts-node -r tsconfig-paths/register src/index.ts
Upvotes: 1