Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ESM + path mapping #2068

Open
damianobarbati opened this issue Sep 21, 2023 · 3 comments
Open

ESM + path mapping #2068

damianobarbati opened this issue Sep 21, 2023 · 3 comments

Comments

@damianobarbati
Copy link

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
Copy link

same as

@Naddiseo
Copy link

Naddiseo commented Oct 3, 2023

Here's my workaround for the issue and the thread has other suggestions too

@sleep-written
Copy link

sleep-written commented Nov 5, 2023

Check this response.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants