You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: testdata/baselines/reference/submodule/conformance/nodeModulesAllowJsConditionalPackageExports(module=node16).errors.txt
+16-33Lines changed: 16 additions & 33 deletions
Original file line number
Diff line number
Diff line change
@@ -1,27 +1,12 @@
1
-
error TS2209: The project root is ambiguous, but is required to resolve export map entry '.' in file 'package.json'. Supply the `rootDir` compiler option to disambiguate.
2
-
index.cjs(2,22): error TS2307: Cannot find module 'package/cjs' or its corresponding type declarations.
3
-
index.cjs(3,22): error TS2307: Cannot find module 'package/mjs' or its corresponding type declarations.
4
-
index.cjs(4,23): error TS2307: Cannot find module 'package' or its corresponding type declarations.
5
-
index.js(2,22): error TS2307: Cannot find module 'package/cjs' or its corresponding type declarations.
6
-
index.js(3,22): error TS2307: Cannot find module 'package/mjs' or its corresponding type declarations.
7
-
index.js(4,23): error TS2307: Cannot find module 'package' or its corresponding type declarations.
8
-
index.mjs(2,22): error TS2307: Cannot find module 'package/cjs' or its corresponding type declarations.
9
-
index.mjs(3,22): error TS2307: Cannot find module 'package/mjs' or its corresponding type declarations.
10
-
index.mjs(4,23): error TS2307: Cannot find module 'package' or its corresponding type declarations.
1
+
index.cjs(3,22): error TS1479: The current file is a CommonJS module whose imports will produce 'require' calls; however, the referenced file is an ECMAScript module and cannot be imported with 'require'. Consider writing a dynamic 'import("package/mjs")' call instead.
2
+
index.cjs(4,23): error TS1479: The current file is a CommonJS module whose imports will produce 'require' calls; however, the referenced file is an ECMAScript module and cannot be imported with 'require'. Consider writing a dynamic 'import("package")' call instead.
11
3
12
4
13
-
!!! error TS2209: The project root is ambiguous, but is required to resolve export map entry '.' in file 'package.json'. Supply the `rootDir` compiler option to disambiguate.
14
-
==== index.js (3 errors) ====
5
+
==== index.js (0 errors) ====
15
6
// esm format file
16
7
import * as cjs from "package/cjs";
17
-
~~~~~~~~~~~~~
18
-
!!! error TS2307: Cannot find module 'package/cjs' or its corresponding type declarations.
19
8
import * as mjs from "package/mjs";
20
-
~~~~~~~~~~~~~
21
-
!!! error TS2307: Cannot find module 'package/mjs' or its corresponding type declarations.
22
9
import * as type from "package";
23
-
~~~~~~~~~
24
-
!!! error TS2307: Cannot find module 'package' or its corresponding type declarations.
25
10
cjs;
26
11
mjs;
27
12
type;
@@ -33,17 +18,11 @@ index.mjs(4,23): error TS2307: Cannot find module 'package' or its corresponding
33
18
mjsi.mjsSource;
34
19
typei.mjsSource;
35
20
ts.mjsSource;
36
-
==== index.mjs (3 errors) ====
21
+
==== index.mjs (0 errors) ====
37
22
// esm format file
38
23
import * as cjs from "package/cjs";
39
-
~~~~~~~~~~~~~
40
-
!!! error TS2307: Cannot find module 'package/cjs' or its corresponding type declarations.
41
24
import * as mjs from "package/mjs";
42
-
~~~~~~~~~~~~~
43
-
!!! error TS2307: Cannot find module 'package/mjs' or its corresponding type declarations.
44
25
import * as type from "package";
45
-
~~~~~~~~~
46
-
!!! error TS2307: Cannot find module 'package' or its corresponding type declarations.
47
26
cjs;
48
27
mjs;
49
28
type;
@@ -55,17 +34,15 @@ index.mjs(4,23): error TS2307: Cannot find module 'package' or its corresponding
55
34
mjsi.mjsSource;
56
35
typei.mjsSource;
57
36
ts.mjsSource;
58
-
==== index.cjs (3 errors) ====
37
+
==== index.cjs (2 errors) ====
59
38
// cjs format file
60
39
import * as cjs from "package/cjs";
61
-
~~~~~~~~~~~~~
62
-
!!! error TS2307: Cannot find module 'package/cjs' or its corresponding type declarations.
63
40
import * as mjs from "package/mjs";
64
41
~~~~~~~~~~~~~
65
-
!!! error TS2307: Cannot find module 'package/mjs' or its corresponding type declarations.
42
+
!!! error TS1479: The current file is a CommonJS module whose imports will produce 'require' calls; however, the referenced file is an ECMAScript module and cannot be imported with 'require'. Consider writing a dynamic 'import("package/mjs")' call instead.
66
43
import * as type from "package";
67
44
~~~~~~~~~
68
-
!!! error TS2307: Cannot find module 'package' or its corresponding type declarations.
45
+
!!! error TS1479: The current file is a CommonJS module whose imports will produce 'require' calls; however, the referenced file is an ECMAScript module and cannot be imported with 'require'. Consider writing a dynamic 'import("package")' call instead.
69
46
cjs;
70
47
mjs;
71
48
type;
@@ -78,6 +55,9 @@ index.mjs(4,23): error TS2307: Cannot find module 'package' or its corresponding
Copy file name to clipboardExpand all lines: testdata/baselines/reference/submodule/conformance/nodeModulesAllowJsConditionalPackageExports(module=node16).js
Copy file name to clipboardExpand all lines: testdata/baselines/reference/submodule/conformance/nodeModulesAllowJsConditionalPackageExports(module=node16).js.diff
0 commit comments