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

TS 5.x and ESM does not work with verbatimModuleSyntax #1987

Closed
lmiller1990 opened this issue Apr 6, 2023 · 1 comment
Closed

TS 5.x and ESM does not work with verbatimModuleSyntax #1987

lmiller1990 opened this issue Apr 6, 2023 · 1 comment

Comments

@lmiller1990
Copy link

Search Terms

verbatimModuleSyntax

Expected Behavior

Works with ts-node/esm and verbatimModuleSyntax in TS 5

Actual Behavior

/Users/lachlanmiller/code/dump/tsnode/node_modules/ts-node/src/index.ts:859
    return new TSError(diagnosticText, diagnosticCodes, diagnostics);
           ^
TSError: ⨯ Unable to compile TypeScript:
index.ts:1:21 - error TS5097: An import path can only end with a '.ts' extension when 'allowImportingTsExtensions' is enabled.

Steps to reproduce the problem

Identical to #1981 but using https://github.com/lmiller1990/ts-node-transpile-error/tree/verbatimModuleSyntax (note the branch: verbatimModuleSyntax)

Minimal reproduction

https://github.com/lmiller1990/ts-node-transpile-error/tree/verbatimModuleSyntax

Specifications

  • ts-node version:
  • node version:
  • TypeScript version:
  • tsconfig.json, if you're using one:
{}
  • package.json:
{}
  • Operating system and version:
  • If Windows, are you using WSL or WSL2?:
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

1 participant