File: moduleResolutionWithoutExtension8.errors.txt

package info (click to toggle)
node-typescript 4.8.4%2Bds1-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 523,068 kB
  • sloc: javascript: 1,735,777; makefile: 7; sh: 1
file content (8 lines) | stat: -rw-r--r-- 599 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
/src/bar.cts(2,8): error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path.


==== /src/bar.cts (1 errors) ====
    // Extensionless relative path dynamic import in a cjs module
    import("./foo").then(x => x); // should error, ask for extension
           ~~~~~~~
!!! error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path.