ESM + path mapping
damianobarbati opened this issue · 3 comments
damianobarbati commented
Is https://typestrong.org/ts-node/docs/paths/ supposed to be working with ESM?
Adding the following to tsconfig.json
:
"ts-node": {
"esm": true,
"experimentalSpecifierResolution": "node",
"require": ["tsconfig-paths/register"]
}
Results in this error:
Error: Cannot find package '@controller/Lesson' imported from /Users/damians/Desktop/box696/packages/api/src/jobs.ts
When trying to load any mapped import:
import LessonController from '@controller/Lesson';
soom-lupulus commented
same as
Naddiseo commented
Here's my workaround for the issue and the thread has other suggestions too
sleep-written commented
Check this response.