mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-11-18 20:11:14 +00:00
Update error messages for CJS imports resolving to ES modules (#50088)
* Update error messages for CJS imports resolving to ES modules * Update error message * Use package scope from source file * Update baselines * Issue error for JSX/TSX files * Switch from related info to message chain
This commit is contained in:
1 parent
b1176ce5e8
commit
7afd14f263
51 files changed
+708
-407
No files matched your search
+45
-1
@@ -3576,7 +3576,51 @@ namespace ts {
|
||||
// An override clause will take effect for type-only imports and import types, and allows importing the types across formats, regardless of
|
||||
// normal mode restrictions
|
||||
if (isSyncImport && sourceFile.impliedNodeFormat === ModuleKind.ESNext && !getResolutionModeOverrideForClause(overrideClause)) {
|
||||
error(errorNode, Diagnostics.Module_0_cannot_be_imported_using_this_construct_The_specifier_only_resolves_to_an_ES_module_which_cannot_be_imported_synchronously_Use_dynamic_import_instead, moduleReference);
|
||||
if (findAncestor(location, isImportEqualsDeclaration)) {
|
||||
// ImportEquals in a ESM file resolving to another ESM file
|
||||
error(errorNode, Diagnostics.Module_0_cannot_be_imported_using_this_construct_The_specifier_only_resolves_to_an_ES_module_which_cannot_be_imported_with_require_Use_an_ECMAScript_import_instead, moduleReference);
|
||||
}
|
||||
else {
|
||||
// CJS file resolving to an ESM file
|
||||
let diagnosticDetails;
|
||||
const ext = tryGetExtensionFromPath(currentSourceFile.fileName);
|
||||
if (ext === Extension.Ts || ext === Extension.Js || ext === Extension.Tsx || ext === Extension.Jsx) {
|
||||
const scope = currentSourceFile.packageJsonScope;
|
||||
const targetExt = ext === Extension.Ts ? Extension.Mts : ext === Extension.Js ? Extension.Mjs : undefined;
|
||||
if (scope && !scope.packageJsonContent.type) {
|
||||
if (targetExt) {
|
||||
diagnosticDetails = chainDiagnosticMessages(
|
||||
/*details*/ undefined,
|
||||
Diagnostics.To_convert_this_file_to_an_ECMAScript_module_change_its_file_extension_to_0_or_add_the_field_type_Colon_module_to_1,
|
||||
targetExt,
|
||||
combinePaths(scope.packageDirectory, "package.json"));
|
||||
}
|
||||
else {
|
||||
diagnosticDetails = chainDiagnosticMessages(
|
||||
/*details*/ undefined,
|
||||
Diagnostics.To_convert_this_file_to_an_ECMAScript_module_add_the_field_type_Colon_module_to_0,
|
||||
combinePaths(scope.packageDirectory, "package.json"));
|
||||
}
|
||||
}
|
||||
else {
|
||||
if (targetExt) {
|
||||
diagnosticDetails = chainDiagnosticMessages(
|
||||
/*details*/ undefined,
|
||||
Diagnostics.To_convert_this_file_to_an_ECMAScript_module_change_its_file_extension_to_0_or_create_a_local_package_json_file_with_type_Colon_module,
|
||||
targetExt);
|
||||
}
|
||||
else {
|
||||
diagnosticDetails = chainDiagnosticMessages(
|
||||
/*details*/ undefined,
|
||||
Diagnostics.To_convert_this_file_to_an_ECMAScript_module_create_a_local_package_json_file_with_type_Colon_module);
|
||||
}
|
||||
}
|
||||
}
|
||||
diagnostics.add(createDiagnosticForNodeFromMessageChain(errorNode, chainDiagnosticMessages(
|
||||
diagnosticDetails,
|
||||
Diagnostics.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_0_call_instead,
|
||||
moduleReference)));
|
||||
}
|
||||
}
|
||||
}
|
||||
// merged symbol is module declaration symbol combined with all augmentations
|
||||
|
||||
@@ -1485,7 +1485,7 @@
|
||||
"category": "Error",
|
||||
"code": 1470
|
||||
},
|
||||
"Module '{0}' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.": {
|
||||
"Module '{0}' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported with 'require'. Use an ECMAScript import instead.": {
|
||||
"category": "Error",
|
||||
"code": 1471
|
||||
},
|
||||
@@ -1517,6 +1517,26 @@
|
||||
"category": "Error",
|
||||
"code": 1478
|
||||
},
|
||||
"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(\"{0}\")' call instead.": {
|
||||
"category": "Error",
|
||||
"code": 1479
|
||||
},
|
||||
"To convert this file to an ECMAScript module, change its file extension to '{0}' or create a local package.json file with `{ \"type\": \"module\" }`.": {
|
||||
"category": "Message",
|
||||
"code": 1480
|
||||
},
|
||||
"To convert this file to an ECMAScript module, change its file extension to '{0}', or add the field `\"type\": \"module\"` to '{1}'.": {
|
||||
"category": "Message",
|
||||
"code": 1481
|
||||
},
|
||||
"To convert this file to an ECMAScript module, add the field `\"type\": \"module\"` to '{0}'.": {
|
||||
"category": "Message",
|
||||
"code": 1482
|
||||
},
|
||||
"To convert this file to an ECMAScript module, create a local package.json file with `{ \"type\": \"module\" }`.": {
|
||||
"category": "Message",
|
||||
"code": 1483
|
||||
},
|
||||
|
||||
"The types of '{0}' are incompatible between these types.": {
|
||||
"category": "Error",
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
error TS2209: The project root is ambiguous, but is required to resolve export map entry '.' in file 'tests/cases/conformance/node/allowJs/package.json'. Supply the `rootDir` compiler option to disambiguate.
|
||||
tests/cases/conformance/node/allowJs/index.cjs(2,23): error TS1471: Module 'package' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
tests/cases/conformance/node/allowJs/index.cjs(2,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.
|
||||
|
||||
|
||||
!!! error TS2209: The project root is ambiguous, but is required to resolve export map entry '.' in file 'tests/cases/conformance/node/allowJs/package.json'. Supply the `rootDir` compiler option to disambiguate.
|
||||
@@ -15,7 +15,7 @@ tests/cases/conformance/node/allowJs/index.cjs(2,23): error TS1471: Module 'pack
|
||||
// esm format file
|
||||
import * as self from "package";
|
||||
~~~~~~~~~
|
||||
!!! error TS1471: Module 'package' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
!!! 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.
|
||||
self;
|
||||
==== tests/cases/conformance/node/allowJs/package.json (0 errors) ====
|
||||
{
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
error TS2209: The project root is ambiguous, but is required to resolve export map entry '.' in file 'tests/cases/conformance/node/allowJs/package.json'. Supply the `rootDir` compiler option to disambiguate.
|
||||
tests/cases/conformance/node/allowJs/index.cjs(2,23): error TS1471: Module 'package' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
tests/cases/conformance/node/allowJs/index.cjs(2,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.
|
||||
|
||||
|
||||
!!! error TS2209: The project root is ambiguous, but is required to resolve export map entry '.' in file 'tests/cases/conformance/node/allowJs/package.json'. Supply the `rootDir` compiler option to disambiguate.
|
||||
@@ -15,7 +15,7 @@ tests/cases/conformance/node/allowJs/index.cjs(2,23): error TS1471: Module 'pack
|
||||
// esm format file
|
||||
import * as self from "package";
|
||||
~~~~~~~~~
|
||||
!!! error TS1471: Module 'package' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
!!! 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.
|
||||
self;
|
||||
==== tests/cases/conformance/node/allowJs/package.json (0 errors) ====
|
||||
{
|
||||
|
||||
@@ -1,19 +1,19 @@
|
||||
tests/cases/conformance/node/index.cts(2,21): error TS1471: Module './index.js' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
tests/cases/conformance/node/index.cts(3,21): error TS1471: Module './index.mjs' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
tests/cases/conformance/node/index.cts(6,21): error TS1471: Module './subfolder/index.mjs' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
tests/cases/conformance/node/index.cts(9,21): error TS1471: Module './subfolder2/index.mjs' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
tests/cases/conformance/node/index.cts(11,22): error TS1471: Module './subfolder2/another/index.js' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
tests/cases/conformance/node/index.cts(12,22): error TS1471: Module './subfolder2/another/index.mjs' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
tests/cases/conformance/node/index.cts(15,22): error TS1471: Module './' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
tests/cases/conformance/node/index.cts(16,22): error TS1471: Module './index' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
tests/cases/conformance/node/index.cts(23,22): error TS1471: Module './subfolder2/another' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
tests/cases/conformance/node/index.cts(24,22): error TS1471: Module './subfolder2/another/' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
tests/cases/conformance/node/index.cts(25,22): error TS1471: Module './subfolder2/another/index' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
tests/cases/conformance/node/index.cts(51,22): error TS1471: Module './' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
tests/cases/conformance/node/index.cts(52,22): error TS1471: Module './index' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
tests/cases/conformance/node/index.cts(59,22): error TS1471: Module './subfolder2/another' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
tests/cases/conformance/node/index.cts(60,22): error TS1471: Module './subfolder2/another/' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
tests/cases/conformance/node/index.cts(61,22): error TS1471: Module './subfolder2/another/index' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
tests/cases/conformance/node/index.cts(2,21): 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("./index.js")' call instead.
|
||||
tests/cases/conformance/node/index.cts(3,21): 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("./index.mjs")' call instead.
|
||||
tests/cases/conformance/node/index.cts(6,21): 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("./subfolder/index.mjs")' call instead.
|
||||
tests/cases/conformance/node/index.cts(9,21): 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("./subfolder2/index.mjs")' call instead.
|
||||
tests/cases/conformance/node/index.cts(11,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("./subfolder2/another/index.js")' call instead.
|
||||
tests/cases/conformance/node/index.cts(12,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("./subfolder2/another/index.mjs")' call instead.
|
||||
tests/cases/conformance/node/index.cts(15,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("./")' call instead.
|
||||
tests/cases/conformance/node/index.cts(16,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("./index")' call instead.
|
||||
tests/cases/conformance/node/index.cts(23,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("./subfolder2/another")' call instead.
|
||||
tests/cases/conformance/node/index.cts(24,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("./subfolder2/another/")' call instead.
|
||||
tests/cases/conformance/node/index.cts(25,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("./subfolder2/another/index")' call instead.
|
||||
tests/cases/conformance/node/index.cts(51,22): error TS1471: Module './' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported with 'require'. Use an ECMAScript import instead.
|
||||
tests/cases/conformance/node/index.cts(52,22): error TS1471: Module './index' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported with 'require'. Use an ECMAScript import instead.
|
||||
tests/cases/conformance/node/index.cts(59,22): error TS1471: Module './subfolder2/another' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported with 'require'. Use an ECMAScript import instead.
|
||||
tests/cases/conformance/node/index.cts(60,22): error TS1471: Module './subfolder2/another/' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported with 'require'. Use an ECMAScript import instead.
|
||||
tests/cases/conformance/node/index.cts(61,22): error TS1471: Module './subfolder2/another/index' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported with 'require'. Use an ECMAScript import instead.
|
||||
tests/cases/conformance/node/index.cts(75,21): error TS2307: Cannot find module './' or its corresponding type declarations.
|
||||
tests/cases/conformance/node/index.cts(76,21): error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Did you mean './index.mjs'?
|
||||
tests/cases/conformance/node/index.cts(77,21): 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.
|
||||
@@ -36,11 +36,11 @@ tests/cases/conformance/node/index.mts(21,22): error TS2835: Relative import pat
|
||||
tests/cases/conformance/node/index.mts(22,22): 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.
|
||||
tests/cases/conformance/node/index.mts(23,22): 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.
|
||||
tests/cases/conformance/node/index.mts(24,22): error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Did you mean './subfolder2/another/index.mjs'?
|
||||
tests/cases/conformance/node/index.mts(50,22): error TS1471: Module './' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
tests/cases/conformance/node/index.mts(51,22): error TS1471: Module './index' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
tests/cases/conformance/node/index.mts(58,22): error TS1471: Module './subfolder2/another' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
tests/cases/conformance/node/index.mts(59,22): error TS1471: Module './subfolder2/another/' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
tests/cases/conformance/node/index.mts(60,22): error TS1471: Module './subfolder2/another/index' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
tests/cases/conformance/node/index.mts(50,22): error TS1471: Module './' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported with 'require'. Use an ECMAScript import instead.
|
||||
tests/cases/conformance/node/index.mts(51,22): error TS1471: Module './index' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported with 'require'. Use an ECMAScript import instead.
|
||||
tests/cases/conformance/node/index.mts(58,22): error TS1471: Module './subfolder2/another' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported with 'require'. Use an ECMAScript import instead.
|
||||
tests/cases/conformance/node/index.mts(59,22): error TS1471: Module './subfolder2/another/' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported with 'require'. Use an ECMAScript import instead.
|
||||
tests/cases/conformance/node/index.mts(60,22): error TS1471: Module './subfolder2/another/index' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported with 'require'. Use an ECMAScript import instead.
|
||||
tests/cases/conformance/node/index.mts(74,21): error TS2307: Cannot find module './' or its corresponding type declarations.
|
||||
tests/cases/conformance/node/index.mts(75,21): error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Did you mean './index.mjs'?
|
||||
tests/cases/conformance/node/index.mts(76,21): 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.
|
||||
@@ -63,11 +63,11 @@ tests/cases/conformance/node/index.ts(21,22): error TS2835: Relative import path
|
||||
tests/cases/conformance/node/index.ts(22,22): 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.
|
||||
tests/cases/conformance/node/index.ts(23,22): 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.
|
||||
tests/cases/conformance/node/index.ts(24,22): error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Did you mean './subfolder2/another/index.mjs'?
|
||||
tests/cases/conformance/node/index.ts(50,22): error TS1471: Module './' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
tests/cases/conformance/node/index.ts(51,22): error TS1471: Module './index' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
tests/cases/conformance/node/index.ts(58,22): error TS1471: Module './subfolder2/another' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
tests/cases/conformance/node/index.ts(59,22): error TS1471: Module './subfolder2/another/' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
tests/cases/conformance/node/index.ts(60,22): error TS1471: Module './subfolder2/another/index' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
tests/cases/conformance/node/index.ts(50,22): error TS1471: Module './' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported with 'require'. Use an ECMAScript import instead.
|
||||
tests/cases/conformance/node/index.ts(51,22): error TS1471: Module './index' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported with 'require'. Use an ECMAScript import instead.
|
||||
tests/cases/conformance/node/index.ts(58,22): error TS1471: Module './subfolder2/another' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported with 'require'. Use an ECMAScript import instead.
|
||||
tests/cases/conformance/node/index.ts(59,22): error TS1471: Module './subfolder2/another/' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported with 'require'. Use an ECMAScript import instead.
|
||||
tests/cases/conformance/node/index.ts(60,22): error TS1471: Module './subfolder2/another/index' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported with 'require'. Use an ECMAScript import instead.
|
||||
tests/cases/conformance/node/index.ts(74,21): error TS2307: Cannot find module './' or its corresponding type declarations.
|
||||
tests/cases/conformance/node/index.ts(75,21): error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Did you mean './index.mjs'?
|
||||
tests/cases/conformance/node/index.ts(76,21): 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.
|
||||
@@ -191,10 +191,10 @@ tests/cases/conformance/node/index.ts(84,21): error TS2835: Relative import path
|
||||
// These should _mostly_ work - `import = require` always desugars to require calls, which do have extension and index resolution (but can't load anything that resolves to esm!)
|
||||
import m24 = require("./");
|
||||
~~~~
|
||||
!!! error TS1471: Module './' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
!!! error TS1471: Module './' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported with 'require'. Use an ECMAScript import instead.
|
||||
import m25 = require("./index");
|
||||
~~~~~~~~~
|
||||
!!! error TS1471: Module './index' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
!!! error TS1471: Module './index' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported with 'require'. Use an ECMAScript import instead.
|
||||
import m26 = require("./subfolder");
|
||||
import m27 = require("./subfolder/");
|
||||
import m28 = require("./subfolder/index");
|
||||
@@ -203,13 +203,13 @@ tests/cases/conformance/node/index.ts(84,21): error TS2835: Relative import path
|
||||
import m31 = require("./subfolder2/index");
|
||||
import m32 = require("./subfolder2/another");
|
||||
~~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS1471: Module './subfolder2/another' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
!!! error TS1471: Module './subfolder2/another' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported with 'require'. Use an ECMAScript import instead.
|
||||
import m33 = require("./subfolder2/another/");
|
||||
~~~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS1471: Module './subfolder2/another/' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
!!! error TS1471: Module './subfolder2/another/' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported with 'require'. Use an ECMAScript import instead.
|
||||
import m34 = require("./subfolder2/another/index");
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS1471: Module './subfolder2/another/index' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
!!! error TS1471: Module './subfolder2/another/index' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported with 'require'. Use an ECMAScript import instead.
|
||||
void m24;
|
||||
void m25;
|
||||
void m26;
|
||||
@@ -264,35 +264,35 @@ tests/cases/conformance/node/index.ts(84,21): error TS2835: Relative import path
|
||||
// ESM-format imports below should issue errors
|
||||
import * as m1 from "./index.js";
|
||||
~~~~~~~~~~~~
|
||||
!!! error TS1471: Module './index.js' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
!!! 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("./index.js")' call instead.
|
||||
import * as m2 from "./index.mjs";
|
||||
~~~~~~~~~~~~~
|
||||
!!! error TS1471: Module './index.mjs' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
!!! 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("./index.mjs")' call instead.
|
||||
import * as m3 from "./index.cjs";
|
||||
import * as m4 from "./subfolder/index.js";
|
||||
import * as m5 from "./subfolder/index.mjs";
|
||||
~~~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS1471: Module './subfolder/index.mjs' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
!!! 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("./subfolder/index.mjs")' call instead.
|
||||
import * as m6 from "./subfolder/index.cjs";
|
||||
import * as m7 from "./subfolder2/index.js";
|
||||
import * as m8 from "./subfolder2/index.mjs";
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS1471: Module './subfolder2/index.mjs' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
!!! 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("./subfolder2/index.mjs")' call instead.
|
||||
import * as m9 from "./subfolder2/index.cjs";
|
||||
import * as m10 from "./subfolder2/another/index.js";
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS1471: Module './subfolder2/another/index.js' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
!!! 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("./subfolder2/another/index.js")' call instead.
|
||||
import * as m11 from "./subfolder2/another/index.mjs";
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS1471: Module './subfolder2/another/index.mjs' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
!!! 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("./subfolder2/another/index.mjs")' call instead.
|
||||
import * as m12 from "./subfolder2/another/index.cjs";
|
||||
// The next ones should _mostly_ work - cjs format files have index resolution and extension resolution (except for those which resolve to an esm format file)
|
||||
import * as m13 from "./";
|
||||
~~~~
|
||||
!!! error TS1471: Module './' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
!!! 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("./")' call instead.
|
||||
import * as m14 from "./index";
|
||||
~~~~~~~~~
|
||||
!!! error TS1471: Module './index' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
!!! 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("./index")' call instead.
|
||||
import * as m15 from "./subfolder";
|
||||
import * as m16 from "./subfolder/";
|
||||
import * as m17 from "./subfolder/index";
|
||||
@@ -301,13 +301,13 @@ tests/cases/conformance/node/index.ts(84,21): error TS2835: Relative import path
|
||||
import * as m20 from "./subfolder2/index";
|
||||
import * as m21 from "./subfolder2/another";
|
||||
~~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS1471: Module './subfolder2/another' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
!!! 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("./subfolder2/another")' call instead.
|
||||
import * as m22 from "./subfolder2/another/";
|
||||
~~~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS1471: Module './subfolder2/another/' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
!!! 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("./subfolder2/another/")' call instead.
|
||||
import * as m23 from "./subfolder2/another/index";
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS1471: Module './subfolder2/another/index' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
!!! 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("./subfolder2/another/index")' call instead.
|
||||
void m1;
|
||||
void m2;
|
||||
void m3;
|
||||
@@ -335,10 +335,10 @@ tests/cases/conformance/node/index.ts(84,21): error TS2835: Relative import path
|
||||
// These should _mostly_ work - `import = require` always desugars to require calls, which do have extension and index resolution (but can't load anything that resolves to esm!)
|
||||
import m24 = require("./");
|
||||
~~~~
|
||||
!!! error TS1471: Module './' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
!!! error TS1471: Module './' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported with 'require'. Use an ECMAScript import instead.
|
||||
import m25 = require("./index");
|
||||
~~~~~~~~~
|
||||
!!! error TS1471: Module './index' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
!!! error TS1471: Module './index' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported with 'require'. Use an ECMAScript import instead.
|
||||
import m26 = require("./subfolder");
|
||||
import m27 = require("./subfolder/");
|
||||
import m28 = require("./subfolder/index");
|
||||
@@ -347,13 +347,13 @@ tests/cases/conformance/node/index.ts(84,21): error TS2835: Relative import path
|
||||
import m31 = require("./subfolder2/index");
|
||||
import m32 = require("./subfolder2/another");
|
||||
~~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS1471: Module './subfolder2/another' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
!!! error TS1471: Module './subfolder2/another' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported with 'require'. Use an ECMAScript import instead.
|
||||
import m33 = require("./subfolder2/another/");
|
||||
~~~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS1471: Module './subfolder2/another/' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
!!! error TS1471: Module './subfolder2/another/' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported with 'require'. Use an ECMAScript import instead.
|
||||
import m34 = require("./subfolder2/another/index");
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS1471: Module './subfolder2/another/index' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
!!! error TS1471: Module './subfolder2/another/index' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported with 'require'. Use an ECMAScript import instead.
|
||||
void m24;
|
||||
void m25;
|
||||
void m26;
|
||||
@@ -477,10 +477,10 @@ tests/cases/conformance/node/index.ts(84,21): error TS2835: Relative import path
|
||||
// These should _mostly_ work - `import = require` always desugars to require calls, which do have extension and index resolution (but can't load anything that resolves to esm!)
|
||||
import m24 = require("./");
|
||||
~~~~
|
||||
!!! error TS1471: Module './' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
!!! error TS1471: Module './' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported with 'require'. Use an ECMAScript import instead.
|
||||
import m25 = require("./index");
|
||||
~~~~~~~~~
|
||||
!!! error TS1471: Module './index' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
!!! error TS1471: Module './index' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported with 'require'. Use an ECMAScript import instead.
|
||||
import m26 = require("./subfolder");
|
||||
import m27 = require("./subfolder/");
|
||||
import m28 = require("./subfolder/index");
|
||||
@@ -489,13 +489,13 @@ tests/cases/conformance/node/index.ts(84,21): error TS2835: Relative import path
|
||||
import m31 = require("./subfolder2/index");
|
||||
import m32 = require("./subfolder2/another");
|
||||
~~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS1471: Module './subfolder2/another' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
!!! error TS1471: Module './subfolder2/another' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported with 'require'. Use an ECMAScript import instead.
|
||||
import m33 = require("./subfolder2/another/");
|
||||
~~~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS1471: Module './subfolder2/another/' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
!!! error TS1471: Module './subfolder2/another/' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported with 'require'. Use an ECMAScript import instead.
|
||||
import m34 = require("./subfolder2/another/index");
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS1471: Module './subfolder2/another/index' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
!!! error TS1471: Module './subfolder2/another/index' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported with 'require'. Use an ECMAScript import instead.
|
||||
void m24;
|
||||
void m25;
|
||||
void m26;
|
||||
|
||||
@@ -1,19 +1,19 @@
|
||||
tests/cases/conformance/node/index.cts(2,21): error TS1471: Module './index.js' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
tests/cases/conformance/node/index.cts(3,21): error TS1471: Module './index.mjs' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
tests/cases/conformance/node/index.cts(6,21): error TS1471: Module './subfolder/index.mjs' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
tests/cases/conformance/node/index.cts(9,21): error TS1471: Module './subfolder2/index.mjs' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
tests/cases/conformance/node/index.cts(11,22): error TS1471: Module './subfolder2/another/index.js' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
tests/cases/conformance/node/index.cts(12,22): error TS1471: Module './subfolder2/another/index.mjs' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
tests/cases/conformance/node/index.cts(15,22): error TS1471: Module './' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
tests/cases/conformance/node/index.cts(16,22): error TS1471: Module './index' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
tests/cases/conformance/node/index.cts(23,22): error TS1471: Module './subfolder2/another' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
tests/cases/conformance/node/index.cts(24,22): error TS1471: Module './subfolder2/another/' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
tests/cases/conformance/node/index.cts(25,22): error TS1471: Module './subfolder2/another/index' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
tests/cases/conformance/node/index.cts(51,22): error TS1471: Module './' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
tests/cases/conformance/node/index.cts(52,22): error TS1471: Module './index' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
tests/cases/conformance/node/index.cts(59,22): error TS1471: Module './subfolder2/another' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
tests/cases/conformance/node/index.cts(60,22): error TS1471: Module './subfolder2/another/' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
tests/cases/conformance/node/index.cts(61,22): error TS1471: Module './subfolder2/another/index' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
tests/cases/conformance/node/index.cts(2,21): 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("./index.js")' call instead.
|
||||
tests/cases/conformance/node/index.cts(3,21): 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("./index.mjs")' call instead.
|
||||
tests/cases/conformance/node/index.cts(6,21): 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("./subfolder/index.mjs")' call instead.
|
||||
tests/cases/conformance/node/index.cts(9,21): 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("./subfolder2/index.mjs")' call instead.
|
||||
tests/cases/conformance/node/index.cts(11,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("./subfolder2/another/index.js")' call instead.
|
||||
tests/cases/conformance/node/index.cts(12,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("./subfolder2/another/index.mjs")' call instead.
|
||||
tests/cases/conformance/node/index.cts(15,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("./")' call instead.
|
||||
tests/cases/conformance/node/index.cts(16,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("./index")' call instead.
|
||||
tests/cases/conformance/node/index.cts(23,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("./subfolder2/another")' call instead.
|
||||
tests/cases/conformance/node/index.cts(24,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("./subfolder2/another/")' call instead.
|
||||
tests/cases/conformance/node/index.cts(25,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("./subfolder2/another/index")' call instead.
|
||||
tests/cases/conformance/node/index.cts(51,22): error TS1471: Module './' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported with 'require'. Use an ECMAScript import instead.
|
||||
tests/cases/conformance/node/index.cts(52,22): error TS1471: Module './index' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported with 'require'. Use an ECMAScript import instead.
|
||||
tests/cases/conformance/node/index.cts(59,22): error TS1471: Module './subfolder2/another' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported with 'require'. Use an ECMAScript import instead.
|
||||
tests/cases/conformance/node/index.cts(60,22): error TS1471: Module './subfolder2/another/' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported with 'require'. Use an ECMAScript import instead.
|
||||
tests/cases/conformance/node/index.cts(61,22): error TS1471: Module './subfolder2/another/index' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported with 'require'. Use an ECMAScript import instead.
|
||||
tests/cases/conformance/node/index.cts(75,21): error TS2307: Cannot find module './' or its corresponding type declarations.
|
||||
tests/cases/conformance/node/index.cts(76,21): error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Did you mean './index.mjs'?
|
||||
tests/cases/conformance/node/index.cts(77,21): 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.
|
||||
@@ -36,11 +36,11 @@ tests/cases/conformance/node/index.mts(21,22): error TS2835: Relative import pat
|
||||
tests/cases/conformance/node/index.mts(22,22): 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.
|
||||
tests/cases/conformance/node/index.mts(23,22): 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.
|
||||
tests/cases/conformance/node/index.mts(24,22): error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Did you mean './subfolder2/another/index.mjs'?
|
||||
tests/cases/conformance/node/index.mts(50,22): error TS1471: Module './' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
tests/cases/conformance/node/index.mts(51,22): error TS1471: Module './index' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
tests/cases/conformance/node/index.mts(58,22): error TS1471: Module './subfolder2/another' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
tests/cases/conformance/node/index.mts(59,22): error TS1471: Module './subfolder2/another/' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
tests/cases/conformance/node/index.mts(60,22): error TS1471: Module './subfolder2/another/index' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
tests/cases/conformance/node/index.mts(50,22): error TS1471: Module './' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported with 'require'. Use an ECMAScript import instead.
|
||||
tests/cases/conformance/node/index.mts(51,22): error TS1471: Module './index' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported with 'require'. Use an ECMAScript import instead.
|
||||
tests/cases/conformance/node/index.mts(58,22): error TS1471: Module './subfolder2/another' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported with 'require'. Use an ECMAScript import instead.
|
||||
tests/cases/conformance/node/index.mts(59,22): error TS1471: Module './subfolder2/another/' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported with 'require'. Use an ECMAScript import instead.
|
||||
tests/cases/conformance/node/index.mts(60,22): error TS1471: Module './subfolder2/another/index' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported with 'require'. Use an ECMAScript import instead.
|
||||
tests/cases/conformance/node/index.mts(74,21): error TS2307: Cannot find module './' or its corresponding type declarations.
|
||||
tests/cases/conformance/node/index.mts(75,21): error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Did you mean './index.mjs'?
|
||||
tests/cases/conformance/node/index.mts(76,21): 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.
|
||||
@@ -63,11 +63,11 @@ tests/cases/conformance/node/index.ts(21,22): error TS2835: Relative import path
|
||||
tests/cases/conformance/node/index.ts(22,22): 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.
|
||||
tests/cases/conformance/node/index.ts(23,22): 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.
|
||||
tests/cases/conformance/node/index.ts(24,22): error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Did you mean './subfolder2/another/index.mjs'?
|
||||
tests/cases/conformance/node/index.ts(50,22): error TS1471: Module './' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
tests/cases/conformance/node/index.ts(51,22): error TS1471: Module './index' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
tests/cases/conformance/node/index.ts(58,22): error TS1471: Module './subfolder2/another' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
tests/cases/conformance/node/index.ts(59,22): error TS1471: Module './subfolder2/another/' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
tests/cases/conformance/node/index.ts(60,22): error TS1471: Module './subfolder2/another/index' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
tests/cases/conformance/node/index.ts(50,22): error TS1471: Module './' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported with 'require'. Use an ECMAScript import instead.
|
||||
tests/cases/conformance/node/index.ts(51,22): error TS1471: Module './index' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported with 'require'. Use an ECMAScript import instead.
|
||||
tests/cases/conformance/node/index.ts(58,22): error TS1471: Module './subfolder2/another' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported with 'require'. Use an ECMAScript import instead.
|
||||
tests/cases/conformance/node/index.ts(59,22): error TS1471: Module './subfolder2/another/' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported with 'require'. Use an ECMAScript import instead.
|
||||
tests/cases/conformance/node/index.ts(60,22): error TS1471: Module './subfolder2/another/index' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported with 'require'. Use an ECMAScript import instead.
|
||||
tests/cases/conformance/node/index.ts(74,21): error TS2307: Cannot find module './' or its corresponding type declarations.
|
||||
tests/cases/conformance/node/index.ts(75,21): error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Did you mean './index.mjs'?
|
||||
tests/cases/conformance/node/index.ts(76,21): 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.
|
||||
@@ -191,10 +191,10 @@ tests/cases/conformance/node/index.ts(84,21): error TS2835: Relative import path
|
||||
// These should _mostly_ work - `import = require` always desugars to require calls, which do have extension and index resolution (but can't load anything that resolves to esm!)
|
||||
import m24 = require("./");
|
||||
~~~~
|
||||
!!! error TS1471: Module './' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
!!! error TS1471: Module './' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported with 'require'. Use an ECMAScript import instead.
|
||||
import m25 = require("./index");
|
||||
~~~~~~~~~
|
||||
!!! error TS1471: Module './index' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
!!! error TS1471: Module './index' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported with 'require'. Use an ECMAScript import instead.
|
||||
import m26 = require("./subfolder");
|
||||
import m27 = require("./subfolder/");
|
||||
import m28 = require("./subfolder/index");
|
||||
@@ -203,13 +203,13 @@ tests/cases/conformance/node/index.ts(84,21): error TS2835: Relative import path
|
||||
import m31 = require("./subfolder2/index");
|
||||
import m32 = require("./subfolder2/another");
|
||||
~~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS1471: Module './subfolder2/another' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
!!! error TS1471: Module './subfolder2/another' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported with 'require'. Use an ECMAScript import instead.
|
||||
import m33 = require("./subfolder2/another/");
|
||||
~~~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS1471: Module './subfolder2/another/' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
!!! error TS1471: Module './subfolder2/another/' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported with 'require'. Use an ECMAScript import instead.
|
||||
import m34 = require("./subfolder2/another/index");
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS1471: Module './subfolder2/another/index' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
!!! error TS1471: Module './subfolder2/another/index' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported with 'require'. Use an ECMAScript import instead.
|
||||
void m24;
|
||||
void m25;
|
||||
void m26;
|
||||
@@ -264,35 +264,35 @@ tests/cases/conformance/node/index.ts(84,21): error TS2835: Relative import path
|
||||
// ESM-format imports below should issue errors
|
||||
import * as m1 from "./index.js";
|
||||
~~~~~~~~~~~~
|
||||
!!! error TS1471: Module './index.js' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
!!! 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("./index.js")' call instead.
|
||||
import * as m2 from "./index.mjs";
|
||||
~~~~~~~~~~~~~
|
||||
!!! error TS1471: Module './index.mjs' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
!!! 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("./index.mjs")' call instead.
|
||||
import * as m3 from "./index.cjs";
|
||||
import * as m4 from "./subfolder/index.js";
|
||||
import * as m5 from "./subfolder/index.mjs";
|
||||
~~~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS1471: Module './subfolder/index.mjs' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
!!! 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("./subfolder/index.mjs")' call instead.
|
||||
import * as m6 from "./subfolder/index.cjs";
|
||||
import * as m7 from "./subfolder2/index.js";
|
||||
import * as m8 from "./subfolder2/index.mjs";
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS1471: Module './subfolder2/index.mjs' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
!!! 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("./subfolder2/index.mjs")' call instead.
|
||||
import * as m9 from "./subfolder2/index.cjs";
|
||||
import * as m10 from "./subfolder2/another/index.js";
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS1471: Module './subfolder2/another/index.js' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
!!! 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("./subfolder2/another/index.js")' call instead.
|
||||
import * as m11 from "./subfolder2/another/index.mjs";
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS1471: Module './subfolder2/another/index.mjs' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
!!! 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("./subfolder2/another/index.mjs")' call instead.
|
||||
import * as m12 from "./subfolder2/another/index.cjs";
|
||||
// The next ones should _mostly_ work - cjs format files have index resolution and extension resolution (except for those which resolve to an esm format file)
|
||||
import * as m13 from "./";
|
||||
~~~~
|
||||
!!! error TS1471: Module './' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
!!! 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("./")' call instead.
|
||||
import * as m14 from "./index";
|
||||
~~~~~~~~~
|
||||
!!! error TS1471: Module './index' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
!!! 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("./index")' call instead.
|
||||
import * as m15 from "./subfolder";
|
||||
import * as m16 from "./subfolder/";
|
||||
import * as m17 from "./subfolder/index";
|
||||
@@ -301,13 +301,13 @@ tests/cases/conformance/node/index.ts(84,21): error TS2835: Relative import path
|
||||
import * as m20 from "./subfolder2/index";
|
||||
import * as m21 from "./subfolder2/another";
|
||||
~~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS1471: Module './subfolder2/another' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
!!! 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("./subfolder2/another")' call instead.
|
||||
import * as m22 from "./subfolder2/another/";
|
||||
~~~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS1471: Module './subfolder2/another/' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
!!! 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("./subfolder2/another/")' call instead.
|
||||
import * as m23 from "./subfolder2/another/index";
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS1471: Module './subfolder2/another/index' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
!!! 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("./subfolder2/another/index")' call instead.
|
||||
void m1;
|
||||
void m2;
|
||||
void m3;
|
||||
@@ -335,10 +335,10 @@ tests/cases/conformance/node/index.ts(84,21): error TS2835: Relative import path
|
||||
// These should _mostly_ work - `import = require` always desugars to require calls, which do have extension and index resolution (but can't load anything that resolves to esm!)
|
||||
import m24 = require("./");
|
||||
~~~~
|
||||
!!! error TS1471: Module './' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
!!! error TS1471: Module './' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported with 'require'. Use an ECMAScript import instead.
|
||||
import m25 = require("./index");
|
||||
~~~~~~~~~
|
||||
!!! error TS1471: Module './index' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
!!! error TS1471: Module './index' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported with 'require'. Use an ECMAScript import instead.
|
||||
import m26 = require("./subfolder");
|
||||
import m27 = require("./subfolder/");
|
||||
import m28 = require("./subfolder/index");
|
||||
@@ -347,13 +347,13 @@ tests/cases/conformance/node/index.ts(84,21): error TS2835: Relative import path
|
||||
import m31 = require("./subfolder2/index");
|
||||
import m32 = require("./subfolder2/another");
|
||||
~~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS1471: Module './subfolder2/another' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
!!! error TS1471: Module './subfolder2/another' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported with 'require'. Use an ECMAScript import instead.
|
||||
import m33 = require("./subfolder2/another/");
|
||||
~~~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS1471: Module './subfolder2/another/' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
!!! error TS1471: Module './subfolder2/another/' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported with 'require'. Use an ECMAScript import instead.
|
||||
import m34 = require("./subfolder2/another/index");
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS1471: Module './subfolder2/another/index' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
!!! error TS1471: Module './subfolder2/another/index' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported with 'require'. Use an ECMAScript import instead.
|
||||
void m24;
|
||||
void m25;
|
||||
void m26;
|
||||
@@ -477,10 +477,10 @@ tests/cases/conformance/node/index.ts(84,21): error TS2835: Relative import path
|
||||
// These should _mostly_ work - `import = require` always desugars to require calls, which do have extension and index resolution (but can't load anything that resolves to esm!)
|
||||
import m24 = require("./");
|
||||
~~~~
|
||||
!!! error TS1471: Module './' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
!!! error TS1471: Module './' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported with 'require'. Use an ECMAScript import instead.
|
||||
import m25 = require("./index");
|
||||
~~~~~~~~~
|
||||
!!! error TS1471: Module './index' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
!!! error TS1471: Module './index' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported with 'require'. Use an ECMAScript import instead.
|
||||
import m26 = require("./subfolder");
|
||||
import m27 = require("./subfolder/");
|
||||
import m28 = require("./subfolder/index");
|
||||
@@ -489,13 +489,13 @@ tests/cases/conformance/node/index.ts(84,21): error TS2835: Relative import path
|
||||
import m31 = require("./subfolder2/index");
|
||||
import m32 = require("./subfolder2/another");
|
||||
~~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS1471: Module './subfolder2/another' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
!!! error TS1471: Module './subfolder2/another' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported with 'require'. Use an ECMAScript import instead.
|
||||
import m33 = require("./subfolder2/another/");
|
||||
~~~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS1471: Module './subfolder2/another/' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
!!! error TS1471: Module './subfolder2/another/' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported with 'require'. Use an ECMAScript import instead.
|
||||
import m34 = require("./subfolder2/another/index");
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS1471: Module './subfolder2/another/index' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
!!! error TS1471: Module './subfolder2/another/index' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported with 'require'. Use an ECMAScript import instead.
|
||||
void m24;
|
||||
void m25;
|
||||
void m26;
|
||||
|
||||
@@ -1,18 +1,18 @@
|
||||
tests/cases/conformance/node/allowJs/index.cjs(2,21): error TS1471: Module './index.js' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
tests/cases/conformance/node/allowJs/index.cjs(3,21): error TS1471: Module './index.mjs' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
tests/cases/conformance/node/allowJs/index.cjs(6,21): error TS1471: Module './subfolder/index.mjs' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
tests/cases/conformance/node/allowJs/index.cjs(9,21): error TS1471: Module './subfolder2/index.mjs' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
tests/cases/conformance/node/allowJs/index.cjs(11,22): error TS1471: Module './subfolder2/another/index.js' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
tests/cases/conformance/node/allowJs/index.cjs(12,22): error TS1471: Module './subfolder2/another/index.mjs' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
tests/cases/conformance/node/allowJs/index.cjs(15,22): error TS1471: Module './' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
tests/cases/conformance/node/allowJs/index.cjs(16,22): error TS1471: Module './index' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
tests/cases/conformance/node/allowJs/index.cjs(23,22): error TS1471: Module './subfolder2/another' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
tests/cases/conformance/node/allowJs/index.cjs(24,22): error TS1471: Module './subfolder2/another/' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
tests/cases/conformance/node/allowJs/index.cjs(25,22): error TS1471: Module './subfolder2/another/index' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
tests/cases/conformance/node/allowJs/index.cjs(2,21): 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("./index.js")' call instead.
|
||||
tests/cases/conformance/node/allowJs/index.cjs(3,21): 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("./index.mjs")' call instead.
|
||||
tests/cases/conformance/node/allowJs/index.cjs(6,21): 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("./subfolder/index.mjs")' call instead.
|
||||
tests/cases/conformance/node/allowJs/index.cjs(9,21): 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("./subfolder2/index.mjs")' call instead.
|
||||
tests/cases/conformance/node/allowJs/index.cjs(11,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("./subfolder2/another/index.js")' call instead.
|
||||
tests/cases/conformance/node/allowJs/index.cjs(12,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("./subfolder2/another/index.mjs")' call instead.
|
||||
tests/cases/conformance/node/allowJs/index.cjs(15,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("./")' call instead.
|
||||
tests/cases/conformance/node/allowJs/index.cjs(16,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("./index")' call instead.
|
||||
tests/cases/conformance/node/allowJs/index.cjs(23,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("./subfolder2/another")' call instead.
|
||||
tests/cases/conformance/node/allowJs/index.cjs(24,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("./subfolder2/another/")' call instead.
|
||||
tests/cases/conformance/node/allowJs/index.cjs(25,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("./subfolder2/another/index")' call instead.
|
||||
tests/cases/conformance/node/allowJs/index.cjs(51,1): error TS8002: 'import ... =' can only be used in TypeScript files.
|
||||
tests/cases/conformance/node/allowJs/index.cjs(51,22): error TS1471: Module './' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
tests/cases/conformance/node/allowJs/index.cjs(51,22): error TS1471: Module './' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported with 'require'. Use an ECMAScript import instead.
|
||||
tests/cases/conformance/node/allowJs/index.cjs(52,1): error TS8002: 'import ... =' can only be used in TypeScript files.
|
||||
tests/cases/conformance/node/allowJs/index.cjs(52,22): error TS1471: Module './index' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
tests/cases/conformance/node/allowJs/index.cjs(52,22): error TS1471: Module './index' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported with 'require'. Use an ECMAScript import instead.
|
||||
tests/cases/conformance/node/allowJs/index.cjs(53,1): error TS8002: 'import ... =' can only be used in TypeScript files.
|
||||
tests/cases/conformance/node/allowJs/index.cjs(54,1): error TS8002: 'import ... =' can only be used in TypeScript files.
|
||||
tests/cases/conformance/node/allowJs/index.cjs(55,1): error TS8002: 'import ... =' can only be used in TypeScript files.
|
||||
@@ -20,11 +20,11 @@ tests/cases/conformance/node/allowJs/index.cjs(56,1): error TS8002: 'import ...
|
||||
tests/cases/conformance/node/allowJs/index.cjs(57,1): error TS8002: 'import ... =' can only be used in TypeScript files.
|
||||
tests/cases/conformance/node/allowJs/index.cjs(58,1): error TS8002: 'import ... =' can only be used in TypeScript files.
|
||||
tests/cases/conformance/node/allowJs/index.cjs(59,1): error TS8002: 'import ... =' can only be used in TypeScript files.
|
||||
tests/cases/conformance/node/allowJs/index.cjs(59,22): error TS1471: Module './subfolder2/another' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
tests/cases/conformance/node/allowJs/index.cjs(59,22): error TS1471: Module './subfolder2/another' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported with 'require'. Use an ECMAScript import instead.
|
||||
tests/cases/conformance/node/allowJs/index.cjs(60,1): error TS8002: 'import ... =' can only be used in TypeScript files.
|
||||
tests/cases/conformance/node/allowJs/index.cjs(60,22): error TS1471: Module './subfolder2/another/' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
tests/cases/conformance/node/allowJs/index.cjs(60,22): error TS1471: Module './subfolder2/another/' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported with 'require'. Use an ECMAScript import instead.
|
||||
tests/cases/conformance/node/allowJs/index.cjs(61,1): error TS8002: 'import ... =' can only be used in TypeScript files.
|
||||
tests/cases/conformance/node/allowJs/index.cjs(61,22): error TS1471: Module './subfolder2/another/index' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
tests/cases/conformance/node/allowJs/index.cjs(61,22): error TS1471: Module './subfolder2/another/index' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported with 'require'. Use an ECMAScript import instead.
|
||||
tests/cases/conformance/node/allowJs/index.cjs(75,21): error TS2307: Cannot find module './' or its corresponding type declarations.
|
||||
tests/cases/conformance/node/allowJs/index.cjs(76,21): error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Did you mean './index.mjs'?
|
||||
tests/cases/conformance/node/allowJs/index.cjs(77,21): 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.
|
||||
@@ -48,9 +48,9 @@ tests/cases/conformance/node/allowJs/index.js(22,22): error TS2834: Relative imp
|
||||
tests/cases/conformance/node/allowJs/index.js(23,22): 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.
|
||||
tests/cases/conformance/node/allowJs/index.js(24,22): error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Did you mean './subfolder2/another/index.mjs'?
|
||||
tests/cases/conformance/node/allowJs/index.js(50,1): error TS8002: 'import ... =' can only be used in TypeScript files.
|
||||
tests/cases/conformance/node/allowJs/index.js(50,22): error TS1471: Module './' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
tests/cases/conformance/node/allowJs/index.js(50,22): error TS1471: Module './' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported with 'require'. Use an ECMAScript import instead.
|
||||
tests/cases/conformance/node/allowJs/index.js(51,1): error TS8002: 'import ... =' can only be used in TypeScript files.
|
||||
tests/cases/conformance/node/allowJs/index.js(51,22): error TS1471: Module './index' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
tests/cases/conformance/node/allowJs/index.js(51,22): error TS1471: Module './index' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported with 'require'. Use an ECMAScript import instead.
|
||||
tests/cases/conformance/node/allowJs/index.js(52,1): error TS8002: 'import ... =' can only be used in TypeScript files.
|
||||
tests/cases/conformance/node/allowJs/index.js(53,1): error TS8002: 'import ... =' can only be used in TypeScript files.
|
||||
tests/cases/conformance/node/allowJs/index.js(54,1): error TS8002: 'import ... =' can only be used in TypeScript files.
|
||||
@@ -58,11 +58,11 @@ tests/cases/conformance/node/allowJs/index.js(55,1): error TS8002: 'import ... =
|
||||
tests/cases/conformance/node/allowJs/index.js(56,1): error TS8002: 'import ... =' can only be used in TypeScript files.
|
||||
tests/cases/conformance/node/allowJs/index.js(57,1): error TS8002: 'import ... =' can only be used in TypeScript files.
|
||||
tests/cases/conformance/node/allowJs/index.js(58,1): error TS8002: 'import ... =' can only be used in TypeScript files.
|
||||
tests/cases/conformance/node/allowJs/index.js(58,22): error TS1471: Module './subfolder2/another' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
tests/cases/conformance/node/allowJs/index.js(58,22): error TS1471: Module './subfolder2/another' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported with 'require'. Use an ECMAScript import instead.
|
||||
tests/cases/conformance/node/allowJs/index.js(59,1): error TS8002: 'import ... =' can only be used in TypeScript files.
|
||||
tests/cases/conformance/node/allowJs/index.js(59,22): error TS1471: Module './subfolder2/another/' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
tests/cases/conformance/node/allowJs/index.js(59,22): error TS1471: Module './subfolder2/another/' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported with 'require'. Use an ECMAScript import instead.
|
||||
tests/cases/conformance/node/allowJs/index.js(60,1): error TS8002: 'import ... =' can only be used in TypeScript files.
|
||||
tests/cases/conformance/node/allowJs/index.js(60,22): error TS1471: Module './subfolder2/another/index' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
tests/cases/conformance/node/allowJs/index.js(60,22): error TS1471: Module './subfolder2/another/index' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported with 'require'. Use an ECMAScript import instead.
|
||||
tests/cases/conformance/node/allowJs/index.js(74,21): error TS2307: Cannot find module './' or its corresponding type declarations.
|
||||
tests/cases/conformance/node/allowJs/index.js(75,21): error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Did you mean './index.mjs'?
|
||||
tests/cases/conformance/node/allowJs/index.js(76,21): 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.
|
||||
@@ -86,9 +86,9 @@ tests/cases/conformance/node/allowJs/index.mjs(22,22): error TS2834: Relative im
|
||||
tests/cases/conformance/node/allowJs/index.mjs(23,22): 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.
|
||||
tests/cases/conformance/node/allowJs/index.mjs(24,22): error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Did you mean './subfolder2/another/index.mjs'?
|
||||
tests/cases/conformance/node/allowJs/index.mjs(50,1): error TS8002: 'import ... =' can only be used in TypeScript files.
|
||||
tests/cases/conformance/node/allowJs/index.mjs(50,22): error TS1471: Module './' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
tests/cases/conformance/node/allowJs/index.mjs(50,22): error TS1471: Module './' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported with 'require'. Use an ECMAScript import instead.
|
||||
tests/cases/conformance/node/allowJs/index.mjs(51,1): error TS8002: 'import ... =' can only be used in TypeScript files.
|
||||
tests/cases/conformance/node/allowJs/index.mjs(51,22): error TS1471: Module './index' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
tests/cases/conformance/node/allowJs/index.mjs(51,22): error TS1471: Module './index' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported with 'require'. Use an ECMAScript import instead.
|
||||
tests/cases/conformance/node/allowJs/index.mjs(52,1): error TS8002: 'import ... =' can only be used in TypeScript files.
|
||||
tests/cases/conformance/node/allowJs/index.mjs(53,1): error TS8002: 'import ... =' can only be used in TypeScript files.
|
||||
tests/cases/conformance/node/allowJs/index.mjs(54,1): error TS8002: 'import ... =' can only be used in TypeScript files.
|
||||
@@ -96,11 +96,11 @@ tests/cases/conformance/node/allowJs/index.mjs(55,1): error TS8002: 'import ...
|
||||
tests/cases/conformance/node/allowJs/index.mjs(56,1): error TS8002: 'import ... =' can only be used in TypeScript files.
|
||||
tests/cases/conformance/node/allowJs/index.mjs(57,1): error TS8002: 'import ... =' can only be used in TypeScript files.
|
||||
tests/cases/conformance/node/allowJs/index.mjs(58,1): error TS8002: 'import ... =' can only be used in TypeScript files.
|
||||
tests/cases/conformance/node/allowJs/index.mjs(58,22): error TS1471: Module './subfolder2/another' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
tests/cases/conformance/node/allowJs/index.mjs(58,22): error TS1471: Module './subfolder2/another' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported with 'require'. Use an ECMAScript import instead.
|
||||
tests/cases/conformance/node/allowJs/index.mjs(59,1): error TS8002: 'import ... =' can only be used in TypeScript files.
|
||||
tests/cases/conformance/node/allowJs/index.mjs(59,22): error TS1471: Module './subfolder2/another/' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
tests/cases/conformance/node/allowJs/index.mjs(59,22): error TS1471: Module './subfolder2/another/' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported with 'require'. Use an ECMAScript import instead.
|
||||
tests/cases/conformance/node/allowJs/index.mjs(60,1): error TS8002: 'import ... =' can only be used in TypeScript files.
|
||||
tests/cases/conformance/node/allowJs/index.mjs(60,22): error TS1471: Module './subfolder2/another/index' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
tests/cases/conformance/node/allowJs/index.mjs(60,22): error TS1471: Module './subfolder2/another/index' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported with 'require'. Use an ECMAScript import instead.
|
||||
tests/cases/conformance/node/allowJs/index.mjs(74,21): error TS2307: Cannot find module './' or its corresponding type declarations.
|
||||
tests/cases/conformance/node/allowJs/index.mjs(75,21): error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Did you mean './index.mjs'?
|
||||
tests/cases/conformance/node/allowJs/index.mjs(76,21): 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.
|
||||
@@ -226,12 +226,12 @@ tests/cases/conformance/node/allowJs/index.mjs(84,21): error TS2835: Relative im
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS8002: 'import ... =' can only be used in TypeScript files.
|
||||
~~~~
|
||||
!!! error TS1471: Module './' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
!!! error TS1471: Module './' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported with 'require'. Use an ECMAScript import instead.
|
||||
import m25 = require("./index");
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS8002: 'import ... =' can only be used in TypeScript files.
|
||||
~~~~~~~~~
|
||||
!!! error TS1471: Module './index' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
!!! error TS1471: Module './index' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported with 'require'. Use an ECMAScript import instead.
|
||||
import m26 = require("./subfolder");
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS8002: 'import ... =' can only be used in TypeScript files.
|
||||
@@ -254,17 +254,17 @@ tests/cases/conformance/node/allowJs/index.mjs(84,21): error TS2835: Relative im
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS8002: 'import ... =' can only be used in TypeScript files.
|
||||
~~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS1471: Module './subfolder2/another' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
!!! error TS1471: Module './subfolder2/another' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported with 'require'. Use an ECMAScript import instead.
|
||||
import m33 = require("./subfolder2/another/");
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS8002: 'import ... =' can only be used in TypeScript files.
|
||||
~~~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS1471: Module './subfolder2/another/' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
!!! error TS1471: Module './subfolder2/another/' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported with 'require'. Use an ECMAScript import instead.
|
||||
import m34 = require("./subfolder2/another/index");
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS8002: 'import ... =' can only be used in TypeScript files.
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS1471: Module './subfolder2/another/index' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
!!! error TS1471: Module './subfolder2/another/index' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported with 'require'. Use an ECMAScript import instead.
|
||||
void m24;
|
||||
void m25;
|
||||
void m26;
|
||||
@@ -318,35 +318,35 @@ tests/cases/conformance/node/allowJs/index.mjs(84,21): error TS2835: Relative im
|
||||
// ESM-format imports below should issue errors
|
||||
import * as m1 from "./index.js";
|
||||
~~~~~~~~~~~~
|
||||
!!! error TS1471: Module './index.js' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
!!! 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("./index.js")' call instead.
|
||||
import * as m2 from "./index.mjs";
|
||||
~~~~~~~~~~~~~
|
||||
!!! error TS1471: Module './index.mjs' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
!!! 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("./index.mjs")' call instead.
|
||||
import * as m3 from "./index.cjs";
|
||||
import * as m4 from "./subfolder/index.js";
|
||||
import * as m5 from "./subfolder/index.mjs";
|
||||
~~~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS1471: Module './subfolder/index.mjs' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
!!! 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("./subfolder/index.mjs")' call instead.
|
||||
import * as m6 from "./subfolder/index.cjs";
|
||||
import * as m7 from "./subfolder2/index.js";
|
||||
import * as m8 from "./subfolder2/index.mjs";
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS1471: Module './subfolder2/index.mjs' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
!!! 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("./subfolder2/index.mjs")' call instead.
|
||||
import * as m9 from "./subfolder2/index.cjs";
|
||||
import * as m10 from "./subfolder2/another/index.js";
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS1471: Module './subfolder2/another/index.js' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
!!! 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("./subfolder2/another/index.js")' call instead.
|
||||
import * as m11 from "./subfolder2/another/index.mjs";
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS1471: Module './subfolder2/another/index.mjs' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
!!! 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("./subfolder2/another/index.mjs")' call instead.
|
||||
import * as m12 from "./subfolder2/another/index.cjs";
|
||||
// The next ones should _mostly_ work - cjs format files have index resolution and extension resolution (except for those which resolve to an esm format file)
|
||||
import * as m13 from "./";
|
||||
~~~~
|
||||
!!! error TS1471: Module './' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
!!! 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("./")' call instead.
|
||||
import * as m14 from "./index";
|
||||
~~~~~~~~~
|
||||
!!! error TS1471: Module './index' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
!!! 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("./index")' call instead.
|
||||
import * as m15 from "./subfolder";
|
||||
import * as m16 from "./subfolder/";
|
||||
import * as m17 from "./subfolder/index";
|
||||
@@ -355,13 +355,13 @@ tests/cases/conformance/node/allowJs/index.mjs(84,21): error TS2835: Relative im
|
||||
import * as m20 from "./subfolder2/index";
|
||||
import * as m21 from "./subfolder2/another";
|
||||
~~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS1471: Module './subfolder2/another' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
!!! 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("./subfolder2/another")' call instead.
|
||||
import * as m22 from "./subfolder2/another/";
|
||||
~~~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS1471: Module './subfolder2/another/' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
!!! 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("./subfolder2/another/")' call instead.
|
||||
import * as m23 from "./subfolder2/another/index";
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS1471: Module './subfolder2/another/index' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
!!! 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("./subfolder2/another/index")' call instead.
|
||||
void m1;
|
||||
void m2;
|
||||
void m3;
|
||||
@@ -391,12 +391,12 @@ tests/cases/conformance/node/allowJs/index.mjs(84,21): error TS2835: Relative im
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS8002: 'import ... =' can only be used in TypeScript files.
|
||||
~~~~
|
||||
!!! error TS1471: Module './' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
!!! error TS1471: Module './' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported with 'require'. Use an ECMAScript import instead.
|
||||
import m25 = require("./index");
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS8002: 'import ... =' can only be used in TypeScript files.
|
||||
~~~~~~~~~
|
||||
!!! error TS1471: Module './index' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
!!! error TS1471: Module './index' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported with 'require'. Use an ECMAScript import instead.
|
||||
import m26 = require("./subfolder");
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS8002: 'import ... =' can only be used in TypeScript files.
|
||||
@@ -419,17 +419,17 @@ tests/cases/conformance/node/allowJs/index.mjs(84,21): error TS2835: Relative im
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS8002: 'import ... =' can only be used in TypeScript files.
|
||||
~~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS1471: Module './subfolder2/another' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
!!! error TS1471: Module './subfolder2/another' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported with 'require'. Use an ECMAScript import instead.
|
||||
import m33 = require("./subfolder2/another/");
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS8002: 'import ... =' can only be used in TypeScript files.
|
||||
~~~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS1471: Module './subfolder2/another/' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
!!! error TS1471: Module './subfolder2/another/' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported with 'require'. Use an ECMAScript import instead.
|
||||
import m34 = require("./subfolder2/another/index");
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS8002: 'import ... =' can only be used in TypeScript files.
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS1471: Module './subfolder2/another/index' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
!!! error TS1471: Module './subfolder2/another/index' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported with 'require'. Use an ECMAScript import instead.
|
||||
void m24;
|
||||
void m25;
|
||||
void m26;
|
||||
@@ -555,12 +555,12 @@ tests/cases/conformance/node/allowJs/index.mjs(84,21): error TS2835: Relative im
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS8002: 'import ... =' can only be used in TypeScript files.
|
||||
~~~~
|
||||
!!! error TS1471: Module './' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
!!! error TS1471: Module './' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported with 'require'. Use an ECMAScript import instead.
|
||||
import m25 = require("./index");
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS8002: 'import ... =' can only be used in TypeScript files.
|
||||
~~~~~~~~~
|
||||
!!! error TS1471: Module './index' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
!!! error TS1471: Module './index' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported with 'require'. Use an ECMAScript import instead.
|
||||
import m26 = require("./subfolder");
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS8002: 'import ... =' can only be used in TypeScript files.
|
||||
@@ -583,17 +583,17 @@ tests/cases/conformance/node/allowJs/index.mjs(84,21): error TS2835: Relative im
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS8002: 'import ... =' can only be used in TypeScript files.
|
||||
~~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS1471: Module './subfolder2/another' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
!!! error TS1471: Module './subfolder2/another' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported with 'require'. Use an ECMAScript import instead.
|
||||
import m33 = require("./subfolder2/another/");
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS8002: 'import ... =' can only be used in TypeScript files.
|
||||
~~~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS1471: Module './subfolder2/another/' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
!!! error TS1471: Module './subfolder2/another/' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported with 'require'. Use an ECMAScript import instead.
|
||||
import m34 = require("./subfolder2/another/index");
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS8002: 'import ... =' can only be used in TypeScript files.
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS1471: Module './subfolder2/another/index' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
!!! error TS1471: Module './subfolder2/another/index' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported with 'require'. Use an ECMAScript import instead.
|
||||
void m24;
|
||||
void m25;
|
||||
void m26;
|
||||
|
||||
@@ -1,18 +1,18 @@
|
||||
tests/cases/conformance/node/allowJs/index.cjs(2,21): error TS1471: Module './index.js' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
tests/cases/conformance/node/allowJs/index.cjs(3,21): error TS1471: Module './index.mjs' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
tests/cases/conformance/node/allowJs/index.cjs(6,21): error TS1471: Module './subfolder/index.mjs' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
tests/cases/conformance/node/allowJs/index.cjs(9,21): error TS1471: Module './subfolder2/index.mjs' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
tests/cases/conformance/node/allowJs/index.cjs(11,22): error TS1471: Module './subfolder2/another/index.js' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
tests/cases/conformance/node/allowJs/index.cjs(12,22): error TS1471: Module './subfolder2/another/index.mjs' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
tests/cases/conformance/node/allowJs/index.cjs(15,22): error TS1471: Module './' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
tests/cases/conformance/node/allowJs/index.cjs(16,22): error TS1471: Module './index' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
tests/cases/conformance/node/allowJs/index.cjs(23,22): error TS1471: Module './subfolder2/another' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
tests/cases/conformance/node/allowJs/index.cjs(24,22): error TS1471: Module './subfolder2/another/' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
tests/cases/conformance/node/allowJs/index.cjs(25,22): error TS1471: Module './subfolder2/another/index' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
tests/cases/conformance/node/allowJs/index.cjs(2,21): 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("./index.js")' call instead.
|
||||
tests/cases/conformance/node/allowJs/index.cjs(3,21): 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("./index.mjs")' call instead.
|
||||
tests/cases/conformance/node/allowJs/index.cjs(6,21): 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("./subfolder/index.mjs")' call instead.
|
||||
tests/cases/conformance/node/allowJs/index.cjs(9,21): 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("./subfolder2/index.mjs")' call instead.
|
||||
tests/cases/conformance/node/allowJs/index.cjs(11,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("./subfolder2/another/index.js")' call instead.
|
||||
tests/cases/conformance/node/allowJs/index.cjs(12,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("./subfolder2/another/index.mjs")' call instead.
|
||||
tests/cases/conformance/node/allowJs/index.cjs(15,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("./")' call instead.
|
||||
tests/cases/conformance/node/allowJs/index.cjs(16,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("./index")' call instead.
|
||||
tests/cases/conformance/node/allowJs/index.cjs(23,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("./subfolder2/another")' call instead.
|
||||
tests/cases/conformance/node/allowJs/index.cjs(24,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("./subfolder2/another/")' call instead.
|
||||
tests/cases/conformance/node/allowJs/index.cjs(25,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("./subfolder2/another/index")' call instead.
|
||||
tests/cases/conformance/node/allowJs/index.cjs(51,1): error TS8002: 'import ... =' can only be used in TypeScript files.
|
||||
tests/cases/conformance/node/allowJs/index.cjs(51,22): error TS1471: Module './' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
tests/cases/conformance/node/allowJs/index.cjs(51,22): error TS1471: Module './' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported with 'require'. Use an ECMAScript import instead.
|
||||
tests/cases/conformance/node/allowJs/index.cjs(52,1): error TS8002: 'import ... =' can only be used in TypeScript files.
|
||||
tests/cases/conformance/node/allowJs/index.cjs(52,22): error TS1471: Module './index' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
tests/cases/conformance/node/allowJs/index.cjs(52,22): error TS1471: Module './index' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported with 'require'. Use an ECMAScript import instead.
|
||||
tests/cases/conformance/node/allowJs/index.cjs(53,1): error TS8002: 'import ... =' can only be used in TypeScript files.
|
||||
tests/cases/conformance/node/allowJs/index.cjs(54,1): error TS8002: 'import ... =' can only be used in TypeScript files.
|
||||
tests/cases/conformance/node/allowJs/index.cjs(55,1): error TS8002: 'import ... =' can only be used in TypeScript files.
|
||||
@@ -20,11 +20,11 @@ tests/cases/conformance/node/allowJs/index.cjs(56,1): error TS8002: 'import ...
|
||||
tests/cases/conformance/node/allowJs/index.cjs(57,1): error TS8002: 'import ... =' can only be used in TypeScript files.
|
||||
tests/cases/conformance/node/allowJs/index.cjs(58,1): error TS8002: 'import ... =' can only be used in TypeScript files.
|
||||
tests/cases/conformance/node/allowJs/index.cjs(59,1): error TS8002: 'import ... =' can only be used in TypeScript files.
|
||||
tests/cases/conformance/node/allowJs/index.cjs(59,22): error TS1471: Module './subfolder2/another' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
tests/cases/conformance/node/allowJs/index.cjs(59,22): error TS1471: Module './subfolder2/another' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported with 'require'. Use an ECMAScript import instead.
|
||||
tests/cases/conformance/node/allowJs/index.cjs(60,1): error TS8002: 'import ... =' can only be used in TypeScript files.
|
||||
tests/cases/conformance/node/allowJs/index.cjs(60,22): error TS1471: Module './subfolder2/another/' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
tests/cases/conformance/node/allowJs/index.cjs(60,22): error TS1471: Module './subfolder2/another/' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported with 'require'. Use an ECMAScript import instead.
|
||||
tests/cases/conformance/node/allowJs/index.cjs(61,1): error TS8002: 'import ... =' can only be used in TypeScript files.
|
||||
tests/cases/conformance/node/allowJs/index.cjs(61,22): error TS1471: Module './subfolder2/another/index' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
tests/cases/conformance/node/allowJs/index.cjs(61,22): error TS1471: Module './subfolder2/another/index' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported with 'require'. Use an ECMAScript import instead.
|
||||
tests/cases/conformance/node/allowJs/index.cjs(75,21): error TS2307: Cannot find module './' or its corresponding type declarations.
|
||||
tests/cases/conformance/node/allowJs/index.cjs(76,21): error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Did you mean './index.mjs'?
|
||||
tests/cases/conformance/node/allowJs/index.cjs(77,21): 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.
|
||||
@@ -48,9 +48,9 @@ tests/cases/conformance/node/allowJs/index.js(22,22): error TS2834: Relative imp
|
||||
tests/cases/conformance/node/allowJs/index.js(23,22): 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.
|
||||
tests/cases/conformance/node/allowJs/index.js(24,22): error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Did you mean './subfolder2/another/index.mjs'?
|
||||
tests/cases/conformance/node/allowJs/index.js(50,1): error TS8002: 'import ... =' can only be used in TypeScript files.
|
||||
tests/cases/conformance/node/allowJs/index.js(50,22): error TS1471: Module './' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
tests/cases/conformance/node/allowJs/index.js(50,22): error TS1471: Module './' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported with 'require'. Use an ECMAScript import instead.
|
||||
tests/cases/conformance/node/allowJs/index.js(51,1): error TS8002: 'import ... =' can only be used in TypeScript files.
|
||||
tests/cases/conformance/node/allowJs/index.js(51,22): error TS1471: Module './index' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
tests/cases/conformance/node/allowJs/index.js(51,22): error TS1471: Module './index' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported with 'require'. Use an ECMAScript import instead.
|
||||
tests/cases/conformance/node/allowJs/index.js(52,1): error TS8002: 'import ... =' can only be used in TypeScript files.
|
||||
tests/cases/conformance/node/allowJs/index.js(53,1): error TS8002: 'import ... =' can only be used in TypeScript files.
|
||||
tests/cases/conformance/node/allowJs/index.js(54,1): error TS8002: 'import ... =' can only be used in TypeScript files.
|
||||
@@ -58,11 +58,11 @@ tests/cases/conformance/node/allowJs/index.js(55,1): error TS8002: 'import ... =
|
||||
tests/cases/conformance/node/allowJs/index.js(56,1): error TS8002: 'import ... =' can only be used in TypeScript files.
|
||||
tests/cases/conformance/node/allowJs/index.js(57,1): error TS8002: 'import ... =' can only be used in TypeScript files.
|
||||
tests/cases/conformance/node/allowJs/index.js(58,1): error TS8002: 'import ... =' can only be used in TypeScript files.
|
||||
tests/cases/conformance/node/allowJs/index.js(58,22): error TS1471: Module './subfolder2/another' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
tests/cases/conformance/node/allowJs/index.js(58,22): error TS1471: Module './subfolder2/another' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported with 'require'. Use an ECMAScript import instead.
|
||||
tests/cases/conformance/node/allowJs/index.js(59,1): error TS8002: 'import ... =' can only be used in TypeScript files.
|
||||
tests/cases/conformance/node/allowJs/index.js(59,22): error TS1471: Module './subfolder2/another/' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
tests/cases/conformance/node/allowJs/index.js(59,22): error TS1471: Module './subfolder2/another/' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported with 'require'. Use an ECMAScript import instead.
|
||||
tests/cases/conformance/node/allowJs/index.js(60,1): error TS8002: 'import ... =' can only be used in TypeScript files.
|
||||
tests/cases/conformance/node/allowJs/index.js(60,22): error TS1471: Module './subfolder2/another/index' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
tests/cases/conformance/node/allowJs/index.js(60,22): error TS1471: Module './subfolder2/another/index' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported with 'require'. Use an ECMAScript import instead.
|
||||
tests/cases/conformance/node/allowJs/index.js(74,21): error TS2307: Cannot find module './' or its corresponding type declarations.
|
||||
tests/cases/conformance/node/allowJs/index.js(75,21): error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Did you mean './index.mjs'?
|
||||
tests/cases/conformance/node/allowJs/index.js(76,21): 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.
|
||||
@@ -86,9 +86,9 @@ tests/cases/conformance/node/allowJs/index.mjs(22,22): error TS2834: Relative im
|
||||
tests/cases/conformance/node/allowJs/index.mjs(23,22): 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.
|
||||
tests/cases/conformance/node/allowJs/index.mjs(24,22): error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Did you mean './subfolder2/another/index.mjs'?
|
||||
tests/cases/conformance/node/allowJs/index.mjs(50,1): error TS8002: 'import ... =' can only be used in TypeScript files.
|
||||
tests/cases/conformance/node/allowJs/index.mjs(50,22): error TS1471: Module './' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
tests/cases/conformance/node/allowJs/index.mjs(50,22): error TS1471: Module './' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported with 'require'. Use an ECMAScript import instead.
|
||||
tests/cases/conformance/node/allowJs/index.mjs(51,1): error TS8002: 'import ... =' can only be used in TypeScript files.
|
||||
tests/cases/conformance/node/allowJs/index.mjs(51,22): error TS1471: Module './index' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
tests/cases/conformance/node/allowJs/index.mjs(51,22): error TS1471: Module './index' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported with 'require'. Use an ECMAScript import instead.
|
||||
tests/cases/conformance/node/allowJs/index.mjs(52,1): error TS8002: 'import ... =' can only be used in TypeScript files.
|
||||
tests/cases/conformance/node/allowJs/index.mjs(53,1): error TS8002: 'import ... =' can only be used in TypeScript files.
|
||||
tests/cases/conformance/node/allowJs/index.mjs(54,1): error TS8002: 'import ... =' can only be used in TypeScript files.
|
||||
@@ -96,11 +96,11 @@ tests/cases/conformance/node/allowJs/index.mjs(55,1): error TS8002: 'import ...
|
||||
tests/cases/conformance/node/allowJs/index.mjs(56,1): error TS8002: 'import ... =' can only be used in TypeScript files.
|
||||
tests/cases/conformance/node/allowJs/index.mjs(57,1): error TS8002: 'import ... =' can only be used in TypeScript files.
|
||||
tests/cases/conformance/node/allowJs/index.mjs(58,1): error TS8002: 'import ... =' can only be used in TypeScript files.
|
||||
tests/cases/conformance/node/allowJs/index.mjs(58,22): error TS1471: Module './subfolder2/another' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
tests/cases/conformance/node/allowJs/index.mjs(58,22): error TS1471: Module './subfolder2/another' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported with 'require'. Use an ECMAScript import instead.
|
||||
tests/cases/conformance/node/allowJs/index.mjs(59,1): error TS8002: 'import ... =' can only be used in TypeScript files.
|
||||
tests/cases/conformance/node/allowJs/index.mjs(59,22): error TS1471: Module './subfolder2/another/' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
tests/cases/conformance/node/allowJs/index.mjs(59,22): error TS1471: Module './subfolder2/another/' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported with 'require'. Use an ECMAScript import instead.
|
||||
tests/cases/conformance/node/allowJs/index.mjs(60,1): error TS8002: 'import ... =' can only be used in TypeScript files.
|
||||
tests/cases/conformance/node/allowJs/index.mjs(60,22): error TS1471: Module './subfolder2/another/index' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
tests/cases/conformance/node/allowJs/index.mjs(60,22): error TS1471: Module './subfolder2/another/index' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported with 'require'. Use an ECMAScript import instead.
|
||||
tests/cases/conformance/node/allowJs/index.mjs(74,21): error TS2307: Cannot find module './' or its corresponding type declarations.
|
||||
tests/cases/conformance/node/allowJs/index.mjs(75,21): error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Did you mean './index.mjs'?
|
||||
tests/cases/conformance/node/allowJs/index.mjs(76,21): 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.
|
||||
@@ -226,12 +226,12 @@ tests/cases/conformance/node/allowJs/index.mjs(84,21): error TS2835: Relative im
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS8002: 'import ... =' can only be used in TypeScript files.
|
||||
~~~~
|
||||
!!! error TS1471: Module './' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
!!! error TS1471: Module './' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported with 'require'. Use an ECMAScript import instead.
|
||||
import m25 = require("./index");
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS8002: 'import ... =' can only be used in TypeScript files.
|
||||
~~~~~~~~~
|
||||
!!! error TS1471: Module './index' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
!!! error TS1471: Module './index' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported with 'require'. Use an ECMAScript import instead.
|
||||
import m26 = require("./subfolder");
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS8002: 'import ... =' can only be used in TypeScript files.
|
||||
@@ -254,17 +254,17 @@ tests/cases/conformance/node/allowJs/index.mjs(84,21): error TS2835: Relative im
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS8002: 'import ... =' can only be used in TypeScript files.
|
||||
~~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS1471: Module './subfolder2/another' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
!!! error TS1471: Module './subfolder2/another' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported with 'require'. Use an ECMAScript import instead.
|
||||
import m33 = require("./subfolder2/another/");
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS8002: 'import ... =' can only be used in TypeScript files.
|
||||
~~~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS1471: Module './subfolder2/another/' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
!!! error TS1471: Module './subfolder2/another/' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported with 'require'. Use an ECMAScript import instead.
|
||||
import m34 = require("./subfolder2/another/index");
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS8002: 'import ... =' can only be used in TypeScript files.
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS1471: Module './subfolder2/another/index' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
!!! error TS1471: Module './subfolder2/another/index' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported with 'require'. Use an ECMAScript import instead.
|
||||
void m24;
|
||||
void m25;
|
||||
void m26;
|
||||
@@ -318,35 +318,35 @@ tests/cases/conformance/node/allowJs/index.mjs(84,21): error TS2835: Relative im
|
||||
// ESM-format imports below should issue errors
|
||||
import * as m1 from "./index.js";
|
||||
~~~~~~~~~~~~
|
||||
!!! error TS1471: Module './index.js' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
!!! 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("./index.js")' call instead.
|
||||
import * as m2 from "./index.mjs";
|
||||
~~~~~~~~~~~~~
|
||||
!!! error TS1471: Module './index.mjs' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
!!! 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("./index.mjs")' call instead.
|
||||
import * as m3 from "./index.cjs";
|
||||
import * as m4 from "./subfolder/index.js";
|
||||
import * as m5 from "./subfolder/index.mjs";
|
||||
~~~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS1471: Module './subfolder/index.mjs' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
!!! 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("./subfolder/index.mjs")' call instead.
|
||||
import * as m6 from "./subfolder/index.cjs";
|
||||
import * as m7 from "./subfolder2/index.js";
|
||||
import * as m8 from "./subfolder2/index.mjs";
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS1471: Module './subfolder2/index.mjs' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
!!! 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("./subfolder2/index.mjs")' call instead.
|
||||
import * as m9 from "./subfolder2/index.cjs";
|
||||
import * as m10 from "./subfolder2/another/index.js";
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS1471: Module './subfolder2/another/index.js' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
!!! 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("./subfolder2/another/index.js")' call instead.
|
||||
import * as m11 from "./subfolder2/another/index.mjs";
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS1471: Module './subfolder2/another/index.mjs' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
!!! 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("./subfolder2/another/index.mjs")' call instead.
|
||||
import * as m12 from "./subfolder2/another/index.cjs";
|
||||
// The next ones should _mostly_ work - cjs format files have index resolution and extension resolution (except for those which resolve to an esm format file)
|
||||
import * as m13 from "./";
|
||||
~~~~
|
||||
!!! error TS1471: Module './' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
!!! 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("./")' call instead.
|
||||
import * as m14 from "./index";
|
||||
~~~~~~~~~
|
||||
!!! error TS1471: Module './index' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
!!! 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("./index")' call instead.
|
||||
import * as m15 from "./subfolder";
|
||||
import * as m16 from "./subfolder/";
|
||||
import * as m17 from "./subfolder/index";
|
||||
@@ -355,13 +355,13 @@ tests/cases/conformance/node/allowJs/index.mjs(84,21): error TS2835: Relative im
|
||||
import * as m20 from "./subfolder2/index";
|
||||
import * as m21 from "./subfolder2/another";
|
||||
~~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS1471: Module './subfolder2/another' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
!!! 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("./subfolder2/another")' call instead.
|
||||
import * as m22 from "./subfolder2/another/";
|
||||
~~~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS1471: Module './subfolder2/another/' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
!!! 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("./subfolder2/another/")' call instead.
|
||||
import * as m23 from "./subfolder2/another/index";
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS1471: Module './subfolder2/another/index' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
!!! 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("./subfolder2/another/index")' call instead.
|
||||
void m1;
|
||||
void m2;
|
||||
void m3;
|
||||
@@ -391,12 +391,12 @@ tests/cases/conformance/node/allowJs/index.mjs(84,21): error TS2835: Relative im
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS8002: 'import ... =' can only be used in TypeScript files.
|
||||
~~~~
|
||||
!!! error TS1471: Module './' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
!!! error TS1471: Module './' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported with 'require'. Use an ECMAScript import instead.
|
||||
import m25 = require("./index");
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS8002: 'import ... =' can only be used in TypeScript files.
|
||||
~~~~~~~~~
|
||||
!!! error TS1471: Module './index' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
!!! error TS1471: Module './index' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported with 'require'. Use an ECMAScript import instead.
|
||||
import m26 = require("./subfolder");
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS8002: 'import ... =' can only be used in TypeScript files.
|
||||
@@ -419,17 +419,17 @@ tests/cases/conformance/node/allowJs/index.mjs(84,21): error TS2835: Relative im
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS8002: 'import ... =' can only be used in TypeScript files.
|
||||
~~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS1471: Module './subfolder2/another' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
!!! error TS1471: Module './subfolder2/another' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported with 'require'. Use an ECMAScript import instead.
|
||||
import m33 = require("./subfolder2/another/");
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS8002: 'import ... =' can only be used in TypeScript files.
|
||||
~~~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS1471: Module './subfolder2/another/' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
!!! error TS1471: Module './subfolder2/another/' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported with 'require'. Use an ECMAScript import instead.
|
||||
import m34 = require("./subfolder2/another/index");
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS8002: 'import ... =' can only be used in TypeScript files.
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS1471: Module './subfolder2/another/index' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
!!! error TS1471: Module './subfolder2/another/index' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported with 'require'. Use an ECMAScript import instead.
|
||||
void m24;
|
||||
void m25;
|
||||
void m26;
|
||||
@@ -555,12 +555,12 @@ tests/cases/conformance/node/allowJs/index.mjs(84,21): error TS2835: Relative im
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS8002: 'import ... =' can only be used in TypeScript files.
|
||||
~~~~
|
||||
!!! error TS1471: Module './' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
!!! error TS1471: Module './' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported with 'require'. Use an ECMAScript import instead.
|
||||
import m25 = require("./index");
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS8002: 'import ... =' can only be used in TypeScript files.
|
||||
~~~~~~~~~
|
||||
!!! error TS1471: Module './index' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
!!! error TS1471: Module './index' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported with 'require'. Use an ECMAScript import instead.
|
||||
import m26 = require("./subfolder");
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS8002: 'import ... =' can only be used in TypeScript files.
|
||||
@@ -583,17 +583,17 @@ tests/cases/conformance/node/allowJs/index.mjs(84,21): error TS2835: Relative im
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS8002: 'import ... =' can only be used in TypeScript files.
|
||||
~~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS1471: Module './subfolder2/another' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
!!! error TS1471: Module './subfolder2/another' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported with 'require'. Use an ECMAScript import instead.
|
||||
import m33 = require("./subfolder2/another/");
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS8002: 'import ... =' can only be used in TypeScript files.
|
||||
~~~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS1471: Module './subfolder2/another/' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
!!! error TS1471: Module './subfolder2/another/' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported with 'require'. Use an ECMAScript import instead.
|
||||
import m34 = require("./subfolder2/another/index");
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS8002: 'import ... =' can only be used in TypeScript files.
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS1471: Module './subfolder2/another/index' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
!!! error TS1471: Module './subfolder2/another/index' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported with 'require'. Use an ECMAScript import instead.
|
||||
void m24;
|
||||
void m25;
|
||||
void m26;
|
||||
|
||||
+4
-4
@@ -1,6 +1,6 @@
|
||||
error TS2209: The project root is ambiguous, but is required to resolve export map entry '.' in file 'tests/cases/conformance/node/allowJs/package.json'. Supply the `rootDir` compiler option to disambiguate.
|
||||
tests/cases/conformance/node/allowJs/index.cjs(3,22): error TS1471: Module 'package/mjs' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
tests/cases/conformance/node/allowJs/index.cjs(4,23): error TS1471: Module 'package' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
tests/cases/conformance/node/allowJs/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.
|
||||
tests/cases/conformance/node/allowJs/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.
|
||||
tests/cases/conformance/node/allowJs/node_modules/inner/index.d.mts(2,13): error TS2303: Circular definition of import alias 'cjs'.
|
||||
tests/cases/conformance/node/allowJs/node_modules/inner/index.d.ts(2,13): error TS2303: Circular definition of import alias 'cjs'.
|
||||
|
||||
@@ -43,10 +43,10 @@ tests/cases/conformance/node/allowJs/node_modules/inner/index.d.ts(2,13): error
|
||||
import * as cjs from "package/cjs";
|
||||
import * as mjs from "package/mjs";
|
||||
~~~~~~~~~~~~~
|
||||
!!! error TS1471: Module 'package/mjs' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
!!! 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.
|
||||
import * as type from "package";
|
||||
~~~~~~~~~
|
||||
!!! error TS1471: Module 'package' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
!!! 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.
|
||||
cjs;
|
||||
mjs;
|
||||
type;
|
||||
|
||||
+4
-4
@@ -1,6 +1,6 @@
|
||||
error TS2209: The project root is ambiguous, but is required to resolve export map entry '.' in file 'tests/cases/conformance/node/allowJs/package.json'. Supply the `rootDir` compiler option to disambiguate.
|
||||
tests/cases/conformance/node/allowJs/index.cjs(3,22): error TS1471: Module 'package/mjs' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
tests/cases/conformance/node/allowJs/index.cjs(4,23): error TS1471: Module 'package' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
tests/cases/conformance/node/allowJs/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.
|
||||
tests/cases/conformance/node/allowJs/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.
|
||||
tests/cases/conformance/node/allowJs/node_modules/inner/index.d.mts(2,13): error TS2303: Circular definition of import alias 'cjs'.
|
||||
tests/cases/conformance/node/allowJs/node_modules/inner/index.d.ts(2,13): error TS2303: Circular definition of import alias 'cjs'.
|
||||
|
||||
@@ -43,10 +43,10 @@ tests/cases/conformance/node/allowJs/node_modules/inner/index.d.ts(2,13): error
|
||||
import * as cjs from "package/cjs";
|
||||
import * as mjs from "package/mjs";
|
||||
~~~~~~~~~~~~~
|
||||
!!! error TS1471: Module 'package/mjs' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
!!! 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.
|
||||
import * as type from "package";
|
||||
~~~~~~~~~
|
||||
!!! error TS1471: Module 'package' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
!!! 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.
|
||||
cjs;
|
||||
mjs;
|
||||
type;
|
||||
|
||||
+10
-10
@@ -1,10 +1,10 @@
|
||||
error TS2209: The project root is ambiguous, but is required to resolve export map entry '.' in file 'tests/cases/conformance/node/allowJs/package.json'. Supply the `rootDir` compiler option to disambiguate.
|
||||
tests/cases/conformance/node/allowJs/index.cjs(3,22): error TS1471: Module 'package/mjs' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
tests/cases/conformance/node/allowJs/index.cjs(4,23): error TS1471: Module 'package' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
tests/cases/conformance/node/allowJs/index.cjs(9,23): error TS1471: Module 'inner/mjs' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
tests/cases/conformance/node/allowJs/node_modules/inner/index.d.cts(3,22): error TS1471: Module 'inner/mjs' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
tests/cases/conformance/node/allowJs/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.
|
||||
tests/cases/conformance/node/allowJs/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.
|
||||
tests/cases/conformance/node/allowJs/index.cjs(9,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("inner/mjs")' call instead.
|
||||
tests/cases/conformance/node/allowJs/node_modules/inner/index.d.cts(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("inner/mjs")' call instead.
|
||||
tests/cases/conformance/node/allowJs/node_modules/inner/index.d.ts(2,13): error TS2303: Circular definition of import alias 'cjs'.
|
||||
tests/cases/conformance/node/allowJs/node_modules/inner/index.d.ts(3,22): error TS1471: Module 'inner/mjs' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
tests/cases/conformance/node/allowJs/node_modules/inner/index.d.ts(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("inner/mjs")' call instead.
|
||||
|
||||
|
||||
!!! error TS2209: The project root is ambiguous, but is required to resolve export map entry '.' in file 'tests/cases/conformance/node/allowJs/package.json'. Supply the `rootDir` compiler option to disambiguate.
|
||||
@@ -41,17 +41,17 @@ tests/cases/conformance/node/allowJs/node_modules/inner/index.d.ts(3,22): error
|
||||
import * as cjs from "package/cjs";
|
||||
import * as mjs from "package/mjs";
|
||||
~~~~~~~~~~~~~
|
||||
!!! error TS1471: Module 'package/mjs' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
!!! 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.
|
||||
import * as type from "package";
|
||||
~~~~~~~~~
|
||||
!!! error TS1471: Module 'package' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
!!! 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.
|
||||
cjs;
|
||||
mjs;
|
||||
type;
|
||||
import * as cjsi from "inner/cjs";
|
||||
import * as mjsi from "inner/mjs";
|
||||
~~~~~~~~~~~
|
||||
!!! error TS1471: Module 'inner/mjs' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
!!! 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("inner/mjs")' call instead.
|
||||
import * as typei from "inner";
|
||||
cjsi;
|
||||
mjsi;
|
||||
@@ -63,7 +63,7 @@ tests/cases/conformance/node/allowJs/node_modules/inner/index.d.ts(3,22): error
|
||||
!!! error TS2303: Circular definition of import alias 'cjs'.
|
||||
import * as mjs from "inner/mjs";
|
||||
~~~~~~~~~~~
|
||||
!!! error TS1471: Module 'inner/mjs' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
!!! 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("inner/mjs")' call instead.
|
||||
import * as type from "inner";
|
||||
export { cjs };
|
||||
export { mjs };
|
||||
@@ -81,7 +81,7 @@ tests/cases/conformance/node/allowJs/node_modules/inner/index.d.ts(3,22): error
|
||||
import * as cjs from "inner/cjs";
|
||||
import * as mjs from "inner/mjs";
|
||||
~~~~~~~~~~~
|
||||
!!! error TS1471: Module 'inner/mjs' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
!!! 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("inner/mjs")' call instead.
|
||||
import * as type from "inner";
|
||||
export { cjs };
|
||||
export { mjs };
|
||||
|
||||
+10
-10
@@ -1,10 +1,10 @@
|
||||
error TS2209: The project root is ambiguous, but is required to resolve export map entry '.' in file 'tests/cases/conformance/node/allowJs/package.json'. Supply the `rootDir` compiler option to disambiguate.
|
||||
tests/cases/conformance/node/allowJs/index.cjs(3,22): error TS1471: Module 'package/mjs' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
tests/cases/conformance/node/allowJs/index.cjs(4,23): error TS1471: Module 'package' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
tests/cases/conformance/node/allowJs/index.cjs(9,23): error TS1471: Module 'inner/mjs' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
tests/cases/conformance/node/allowJs/node_modules/inner/index.d.cts(3,22): error TS1471: Module 'inner/mjs' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
tests/cases/conformance/node/allowJs/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.
|
||||
tests/cases/conformance/node/allowJs/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.
|
||||
tests/cases/conformance/node/allowJs/index.cjs(9,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("inner/mjs")' call instead.
|
||||
tests/cases/conformance/node/allowJs/node_modules/inner/index.d.cts(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("inner/mjs")' call instead.
|
||||
tests/cases/conformance/node/allowJs/node_modules/inner/index.d.ts(2,13): error TS2303: Circular definition of import alias 'cjs'.
|
||||
tests/cases/conformance/node/allowJs/node_modules/inner/index.d.ts(3,22): error TS1471: Module 'inner/mjs' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
tests/cases/conformance/node/allowJs/node_modules/inner/index.d.ts(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("inner/mjs")' call instead.
|
||||
|
||||
|
||||
!!! error TS2209: The project root is ambiguous, but is required to resolve export map entry '.' in file 'tests/cases/conformance/node/allowJs/package.json'. Supply the `rootDir` compiler option to disambiguate.
|
||||
@@ -41,17 +41,17 @@ tests/cases/conformance/node/allowJs/node_modules/inner/index.d.ts(3,22): error
|
||||
import * as cjs from "package/cjs";
|
||||
import * as mjs from "package/mjs";
|
||||
~~~~~~~~~~~~~
|
||||
!!! error TS1471: Module 'package/mjs' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
!!! 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.
|
||||
import * as type from "package";
|
||||
~~~~~~~~~
|
||||
!!! error TS1471: Module 'package' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
!!! 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.
|
||||
cjs;
|
||||
mjs;
|
||||
type;
|
||||
import * as cjsi from "inner/cjs";
|
||||
import * as mjsi from "inner/mjs";
|
||||
~~~~~~~~~~~
|
||||
!!! error TS1471: Module 'inner/mjs' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
!!! 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("inner/mjs")' call instead.
|
||||
import * as typei from "inner";
|
||||
cjsi;
|
||||
mjsi;
|
||||
@@ -63,7 +63,7 @@ tests/cases/conformance/node/allowJs/node_modules/inner/index.d.ts(3,22): error
|
||||
!!! error TS2303: Circular definition of import alias 'cjs'.
|
||||
import * as mjs from "inner/mjs";
|
||||
~~~~~~~~~~~
|
||||
!!! error TS1471: Module 'inner/mjs' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
!!! 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("inner/mjs")' call instead.
|
||||
import * as type from "inner";
|
||||
export { cjs };
|
||||
export { mjs };
|
||||
@@ -81,7 +81,7 @@ tests/cases/conformance/node/allowJs/node_modules/inner/index.d.ts(3,22): error
|
||||
import * as cjs from "inner/cjs";
|
||||
import * as mjs from "inner/mjs";
|
||||
~~~~~~~~~~~
|
||||
!!! error TS1471: Module 'inner/mjs' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
!!! 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("inner/mjs")' call instead.
|
||||
import * as type from "inner";
|
||||
export { cjs };
|
||||
export { mjs };
|
||||
|
||||
+4
-4
@@ -1,6 +1,6 @@
|
||||
error TS2210: The project root is ambiguous, but is required to resolve import map entry '.' in file 'tests/cases/conformance/node/allowJs/package.json'. Supply the `rootDir` compiler option to disambiguate.
|
||||
tests/cases/conformance/node/allowJs/index.cjs(3,22): error TS1471: Module '#mjs' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
tests/cases/conformance/node/allowJs/index.cjs(4,23): error TS1471: Module '#type' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
tests/cases/conformance/node/allowJs/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("#mjs")' call instead.
|
||||
tests/cases/conformance/node/allowJs/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("#type")' call instead.
|
||||
|
||||
|
||||
!!! error TS2210: The project root is ambiguous, but is required to resolve import map entry '.' in file 'tests/cases/conformance/node/allowJs/package.json'. Supply the `rootDir` compiler option to disambiguate.
|
||||
@@ -25,10 +25,10 @@ tests/cases/conformance/node/allowJs/index.cjs(4,23): error TS1471: Module '#typ
|
||||
import * as cjs from "#cjs";
|
||||
import * as mjs from "#mjs";
|
||||
~~~~~~
|
||||
!!! error TS1471: Module '#mjs' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
!!! 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("#mjs")' call instead.
|
||||
import * as type from "#type";
|
||||
~~~~~~~
|
||||
!!! error TS1471: Module '#type' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
!!! 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("#type")' call instead.
|
||||
cjs;
|
||||
mjs;
|
||||
type;
|
||||
|
||||
+4
-4
@@ -1,6 +1,6 @@
|
||||
error TS2210: The project root is ambiguous, but is required to resolve import map entry '.' in file 'tests/cases/conformance/node/allowJs/package.json'. Supply the `rootDir` compiler option to disambiguate.
|
||||
tests/cases/conformance/node/allowJs/index.cjs(3,22): error TS1471: Module '#mjs' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
tests/cases/conformance/node/allowJs/index.cjs(4,23): error TS1471: Module '#type' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
tests/cases/conformance/node/allowJs/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("#mjs")' call instead.
|
||||
tests/cases/conformance/node/allowJs/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("#type")' call instead.
|
||||
|
||||
|
||||
!!! error TS2210: The project root is ambiguous, but is required to resolve import map entry '.' in file 'tests/cases/conformance/node/allowJs/package.json'. Supply the `rootDir` compiler option to disambiguate.
|
||||
@@ -25,10 +25,10 @@ tests/cases/conformance/node/allowJs/index.cjs(4,23): error TS1471: Module '#typ
|
||||
import * as cjs from "#cjs";
|
||||
import * as mjs from "#mjs";
|
||||
~~~~~~
|
||||
!!! error TS1471: Module '#mjs' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
!!! 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("#mjs")' call instead.
|
||||
import * as type from "#type";
|
||||
~~~~~~~
|
||||
!!! error TS1471: Module '#type' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
!!! 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("#type")' call instead.
|
||||
cjs;
|
||||
mjs;
|
||||
type;
|
||||
|
||||
+6
-6
@@ -1,7 +1,7 @@
|
||||
tests/cases/conformance/node/allowJs/index.cjs(3,23): error TS1471: Module 'inner/mjs/index' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
tests/cases/conformance/node/allowJs/node_modules/inner/index.d.cts(3,22): error TS1471: Module 'inner/mjs/index' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
tests/cases/conformance/node/allowJs/index.cjs(3,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("inner/mjs/index")' call instead.
|
||||
tests/cases/conformance/node/allowJs/node_modules/inner/index.d.cts(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("inner/mjs/index")' call instead.
|
||||
tests/cases/conformance/node/allowJs/node_modules/inner/index.d.ts(2,13): error TS2303: Circular definition of import alias 'cjs'.
|
||||
tests/cases/conformance/node/allowJs/node_modules/inner/index.d.ts(3,22): error TS1471: Module 'inner/mjs/index' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
tests/cases/conformance/node/allowJs/node_modules/inner/index.d.ts(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("inner/mjs/index")' call instead.
|
||||
|
||||
|
||||
==== tests/cases/conformance/node/allowJs/index.js (0 errors) ====
|
||||
@@ -25,7 +25,7 @@ tests/cases/conformance/node/allowJs/node_modules/inner/index.d.ts(3,22): error
|
||||
import * as cjsi from "inner/cjs/index";
|
||||
import * as mjsi from "inner/mjs/index";
|
||||
~~~~~~~~~~~~~~~~~
|
||||
!!! error TS1471: Module 'inner/mjs/index' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
!!! 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("inner/mjs/index")' call instead.
|
||||
import * as typei from "inner/js/index";
|
||||
cjsi;
|
||||
mjsi;
|
||||
@@ -37,7 +37,7 @@ tests/cases/conformance/node/allowJs/node_modules/inner/index.d.ts(3,22): error
|
||||
!!! error TS2303: Circular definition of import alias 'cjs'.
|
||||
import * as mjs from "inner/mjs/index";
|
||||
~~~~~~~~~~~~~~~~~
|
||||
!!! error TS1471: Module 'inner/mjs/index' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
!!! 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("inner/mjs/index")' call instead.
|
||||
import * as type from "inner/js/index";
|
||||
export { cjs };
|
||||
export { mjs };
|
||||
@@ -55,7 +55,7 @@ tests/cases/conformance/node/allowJs/node_modules/inner/index.d.ts(3,22): error
|
||||
import * as cjs from "inner/cjs/index";
|
||||
import * as mjs from "inner/mjs/index";
|
||||
~~~~~~~~~~~~~~~~~
|
||||
!!! error TS1471: Module 'inner/mjs/index' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
!!! 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("inner/mjs/index")' call instead.
|
||||
import * as type from "inner/js/index";
|
||||
export { cjs };
|
||||
export { mjs };
|
||||
|
||||
+6
-6
@@ -1,7 +1,7 @@
|
||||
tests/cases/conformance/node/allowJs/index.cjs(3,23): error TS1471: Module 'inner/mjs/index' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
tests/cases/conformance/node/allowJs/node_modules/inner/index.d.cts(3,22): error TS1471: Module 'inner/mjs/index' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
tests/cases/conformance/node/allowJs/index.cjs(3,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("inner/mjs/index")' call instead.
|
||||
tests/cases/conformance/node/allowJs/node_modules/inner/index.d.cts(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("inner/mjs/index")' call instead.
|
||||
tests/cases/conformance/node/allowJs/node_modules/inner/index.d.ts(2,13): error TS2303: Circular definition of import alias 'cjs'.
|
||||
tests/cases/conformance/node/allowJs/node_modules/inner/index.d.ts(3,22): error TS1471: Module 'inner/mjs/index' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
tests/cases/conformance/node/allowJs/node_modules/inner/index.d.ts(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("inner/mjs/index")' call instead.
|
||||
|
||||
|
||||
==== tests/cases/conformance/node/allowJs/index.js (0 errors) ====
|
||||
@@ -25,7 +25,7 @@ tests/cases/conformance/node/allowJs/node_modules/inner/index.d.ts(3,22): error
|
||||
import * as cjsi from "inner/cjs/index";
|
||||
import * as mjsi from "inner/mjs/index";
|
||||
~~~~~~~~~~~~~~~~~
|
||||
!!! error TS1471: Module 'inner/mjs/index' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
!!! 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("inner/mjs/index")' call instead.
|
||||
import * as typei from "inner/js/index";
|
||||
cjsi;
|
||||
mjsi;
|
||||
@@ -37,7 +37,7 @@ tests/cases/conformance/node/allowJs/node_modules/inner/index.d.ts(3,22): error
|
||||
!!! error TS2303: Circular definition of import alias 'cjs'.
|
||||
import * as mjs from "inner/mjs/index";
|
||||
~~~~~~~~~~~~~~~~~
|
||||
!!! error TS1471: Module 'inner/mjs/index' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
!!! 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("inner/mjs/index")' call instead.
|
||||
import * as type from "inner/js/index";
|
||||
export { cjs };
|
||||
export { mjs };
|
||||
@@ -55,7 +55,7 @@ tests/cases/conformance/node/allowJs/node_modules/inner/index.d.ts(3,22): error
|
||||
import * as cjs from "inner/cjs/index";
|
||||
import * as mjs from "inner/mjs/index";
|
||||
~~~~~~~~~~~~~~~~~
|
||||
!!! error TS1471: Module 'inner/mjs/index' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
!!! 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("inner/mjs/index")' call instead.
|
||||
import * as type from "inner/js/index";
|
||||
export { cjs };
|
||||
export { mjs };
|
||||
|
||||
+6
-6
@@ -1,7 +1,7 @@
|
||||
tests/cases/conformance/node/allowJs/index.cjs(3,23): error TS1471: Module 'inner/mjs/index.mjs' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
tests/cases/conformance/node/allowJs/node_modules/inner/index.d.cts(3,22): error TS1471: Module 'inner/mjs/index.mjs' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
tests/cases/conformance/node/allowJs/index.cjs(3,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("inner/mjs/index.mjs")' call instead.
|
||||
tests/cases/conformance/node/allowJs/node_modules/inner/index.d.cts(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("inner/mjs/index.mjs")' call instead.
|
||||
tests/cases/conformance/node/allowJs/node_modules/inner/index.d.ts(2,13): error TS2303: Circular definition of import alias 'cjs'.
|
||||
tests/cases/conformance/node/allowJs/node_modules/inner/index.d.ts(3,22): error TS1471: Module 'inner/mjs/index.mjs' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
tests/cases/conformance/node/allowJs/node_modules/inner/index.d.ts(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("inner/mjs/index.mjs")' call instead.
|
||||
|
||||
|
||||
==== tests/cases/conformance/node/allowJs/index.js (0 errors) ====
|
||||
@@ -25,7 +25,7 @@ tests/cases/conformance/node/allowJs/node_modules/inner/index.d.ts(3,22): error
|
||||
import * as cjsi from "inner/cjs/index.cjs";
|
||||
import * as mjsi from "inner/mjs/index.mjs";
|
||||
~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS1471: Module 'inner/mjs/index.mjs' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
!!! 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("inner/mjs/index.mjs")' call instead.
|
||||
import * as typei from "inner/js/index.js";
|
||||
cjsi;
|
||||
mjsi;
|
||||
@@ -37,7 +37,7 @@ tests/cases/conformance/node/allowJs/node_modules/inner/index.d.ts(3,22): error
|
||||
!!! error TS2303: Circular definition of import alias 'cjs'.
|
||||
import * as mjs from "inner/mjs/index.mjs";
|
||||
~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS1471: Module 'inner/mjs/index.mjs' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
!!! 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("inner/mjs/index.mjs")' call instead.
|
||||
import * as type from "inner/js/index.js";
|
||||
export { cjs };
|
||||
export { mjs };
|
||||
@@ -55,7 +55,7 @@ tests/cases/conformance/node/allowJs/node_modules/inner/index.d.ts(3,22): error
|
||||
import * as cjs from "inner/cjs/index.cjs";
|
||||
import * as mjs from "inner/mjs/index.mjs";
|
||||
~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS1471: Module 'inner/mjs/index.mjs' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
!!! 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("inner/mjs/index.mjs")' call instead.
|
||||
import * as type from "inner/js/index.js";
|
||||
export { cjs };
|
||||
export { mjs };
|
||||
|
||||
+6
-6
@@ -1,7 +1,7 @@
|
||||
tests/cases/conformance/node/allowJs/index.cjs(3,23): error TS1471: Module 'inner/mjs/index.mjs' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
tests/cases/conformance/node/allowJs/node_modules/inner/index.d.cts(3,22): error TS1471: Module 'inner/mjs/index.mjs' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
tests/cases/conformance/node/allowJs/index.cjs(3,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("inner/mjs/index.mjs")' call instead.
|
||||
tests/cases/conformance/node/allowJs/node_modules/inner/index.d.cts(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("inner/mjs/index.mjs")' call instead.
|
||||
tests/cases/conformance/node/allowJs/node_modules/inner/index.d.ts(2,13): error TS2303: Circular definition of import alias 'cjs'.
|
||||
tests/cases/conformance/node/allowJs/node_modules/inner/index.d.ts(3,22): error TS1471: Module 'inner/mjs/index.mjs' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
tests/cases/conformance/node/allowJs/node_modules/inner/index.d.ts(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("inner/mjs/index.mjs")' call instead.
|
||||
|
||||
|
||||
==== tests/cases/conformance/node/allowJs/index.js (0 errors) ====
|
||||
@@ -25,7 +25,7 @@ tests/cases/conformance/node/allowJs/node_modules/inner/index.d.ts(3,22): error
|
||||
import * as cjsi from "inner/cjs/index.cjs";
|
||||
import * as mjsi from "inner/mjs/index.mjs";
|
||||
~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS1471: Module 'inner/mjs/index.mjs' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
!!! 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("inner/mjs/index.mjs")' call instead.
|
||||
import * as typei from "inner/js/index.js";
|
||||
cjsi;
|
||||
mjsi;
|
||||
@@ -37,7 +37,7 @@ tests/cases/conformance/node/allowJs/node_modules/inner/index.d.ts(3,22): error
|
||||
!!! error TS2303: Circular definition of import alias 'cjs'.
|
||||
import * as mjs from "inner/mjs/index.mjs";
|
||||
~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS1471: Module 'inner/mjs/index.mjs' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
!!! 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("inner/mjs/index.mjs")' call instead.
|
||||
import * as type from "inner/js/index.js";
|
||||
export { cjs };
|
||||
export { mjs };
|
||||
@@ -55,7 +55,7 @@ tests/cases/conformance/node/allowJs/node_modules/inner/index.d.ts(3,22): error
|
||||
import * as cjs from "inner/cjs/index.cjs";
|
||||
import * as mjs from "inner/mjs/index.mjs";
|
||||
~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS1471: Module 'inner/mjs/index.mjs' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
!!! 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("inner/mjs/index.mjs")' call instead.
|
||||
import * as type from "inner/js/index.js";
|
||||
export { cjs };
|
||||
export { mjs };
|
||||
|
||||
+8
-6
@@ -1,9 +1,10 @@
|
||||
tests/cases/conformance/node/allowJs/index.js(3,1): error TS8002: 'import ... =' can only be used in TypeScript files.
|
||||
tests/cases/conformance/node/allowJs/index.js(3,22): error TS1471: Module './index.js' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
tests/cases/conformance/node/allowJs/index.js(3,22): error TS1471: Module './index.js' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported with 'require'. Use an ECMAScript import instead.
|
||||
tests/cases/conformance/node/allowJs/index.js(5,1): error TS8002: 'import ... =' can only be used in TypeScript files.
|
||||
tests/cases/conformance/node/allowJs/subfolder/index.js(2,17): error TS1471: Module '../index.js' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
tests/cases/conformance/node/allowJs/subfolder/index.js(2,17): 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("../index.js")' call instead.
|
||||
To convert this file to an ECMAScript module, change its file extension to '.mjs' or create a local package.json file with `{ "type": "module" }`.
|
||||
tests/cases/conformance/node/allowJs/subfolder/index.js(3,1): error TS8002: 'import ... =' can only be used in TypeScript files.
|
||||
tests/cases/conformance/node/allowJs/subfolder/index.js(3,22): error TS1471: Module '../index.js' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
tests/cases/conformance/node/allowJs/subfolder/index.js(3,22): error TS1471: Module '../index.js' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported with 'require'. Use an ECMAScript import instead.
|
||||
tests/cases/conformance/node/allowJs/subfolder/index.js(5,1): error TS8002: 'import ... =' can only be used in TypeScript files.
|
||||
|
||||
|
||||
@@ -11,12 +12,13 @@ tests/cases/conformance/node/allowJs/subfolder/index.js(5,1): error TS8002: 'imp
|
||||
// cjs format file
|
||||
import {h} from "../index.js";
|
||||
~~~~~~~~~~~~~
|
||||
!!! error TS1471: Module '../index.js' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
!!! 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("../index.js")' call instead.
|
||||
!!! error TS1479: To convert this file to an ECMAScript module, change its file extension to '.mjs' or create a local package.json file with `{ "type": "module" }`.
|
||||
import mod = require("../index.js");
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS8002: 'import ... =' can only be used in TypeScript files.
|
||||
~~~~~~~~~~~~~
|
||||
!!! error TS1471: Module '../index.js' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
!!! error TS1471: Module '../index.js' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported with 'require'. Use an ECMAScript import instead.
|
||||
import {f as _f} from "./index.js";
|
||||
import mod2 = require("./index.js");
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
@@ -33,7 +35,7 @@ tests/cases/conformance/node/allowJs/subfolder/index.js(5,1): error TS8002: 'imp
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS8002: 'import ... =' can only be used in TypeScript files.
|
||||
~~~~~~~~~~~~
|
||||
!!! error TS1471: Module './index.js' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
!!! error TS1471: Module './index.js' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported with 'require'. Use an ECMAScript import instead.
|
||||
import {f} from "./subfolder/index.js";
|
||||
import mod2 = require("./subfolder/index.js");
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
+8
-6
@@ -1,9 +1,10 @@
|
||||
tests/cases/conformance/node/allowJs/index.js(3,1): error TS8002: 'import ... =' can only be used in TypeScript files.
|
||||
tests/cases/conformance/node/allowJs/index.js(3,22): error TS1471: Module './index.js' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
tests/cases/conformance/node/allowJs/index.js(3,22): error TS1471: Module './index.js' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported with 'require'. Use an ECMAScript import instead.
|
||||
tests/cases/conformance/node/allowJs/index.js(5,1): error TS8002: 'import ... =' can only be used in TypeScript files.
|
||||
tests/cases/conformance/node/allowJs/subfolder/index.js(2,17): error TS1471: Module '../index.js' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
tests/cases/conformance/node/allowJs/subfolder/index.js(2,17): 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("../index.js")' call instead.
|
||||
To convert this file to an ECMAScript module, change its file extension to '.mjs' or create a local package.json file with `{ "type": "module" }`.
|
||||
tests/cases/conformance/node/allowJs/subfolder/index.js(3,1): error TS8002: 'import ... =' can only be used in TypeScript files.
|
||||
tests/cases/conformance/node/allowJs/subfolder/index.js(3,22): error TS1471: Module '../index.js' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
tests/cases/conformance/node/allowJs/subfolder/index.js(3,22): error TS1471: Module '../index.js' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported with 'require'. Use an ECMAScript import instead.
|
||||
tests/cases/conformance/node/allowJs/subfolder/index.js(5,1): error TS8002: 'import ... =' can only be used in TypeScript files.
|
||||
|
||||
|
||||
@@ -11,12 +12,13 @@ tests/cases/conformance/node/allowJs/subfolder/index.js(5,1): error TS8002: 'imp
|
||||
// cjs format file
|
||||
import {h} from "../index.js";
|
||||
~~~~~~~~~~~~~
|
||||
!!! error TS1471: Module '../index.js' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
!!! 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("../index.js")' call instead.
|
||||
!!! error TS1479: To convert this file to an ECMAScript module, change its file extension to '.mjs' or create a local package.json file with `{ "type": "module" }`.
|
||||
import mod = require("../index.js");
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS8002: 'import ... =' can only be used in TypeScript files.
|
||||
~~~~~~~~~~~~~
|
||||
!!! error TS1471: Module '../index.js' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
!!! error TS1471: Module '../index.js' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported with 'require'. Use an ECMAScript import instead.
|
||||
import {f as _f} from "./index.js";
|
||||
import mod2 = require("./index.js");
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
@@ -33,7 +35,7 @@ tests/cases/conformance/node/allowJs/subfolder/index.js(5,1): error TS8002: 'imp
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS8002: 'import ... =' can only be used in TypeScript files.
|
||||
~~~~~~~~~~~~
|
||||
!!! error TS1471: Module './index.js' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
!!! error TS1471: Module './index.js' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported with 'require'. Use an ECMAScript import instead.
|
||||
import {f} from "./subfolder/index.js";
|
||||
import mod2 = require("./subfolder/index.js");
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
@@ -0,0 +1,38 @@
|
||||
/ctsExtension.cts(1,16): 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("./module.mjs")' call instead.
|
||||
/jsExtension.js(1,16): 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("./module.mjs")' call instead.
|
||||
To convert this file to an ECMAScript module, change its file extension to '.mjs', or add the field `"type": "module"` to '/package.json'.
|
||||
/tsExtension.ts(1,16): 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("./module.mjs")' call instead.
|
||||
To convert this file to an ECMAScript module, change its file extension to '.mts', or add the field `"type": "module"` to '/package.json'.
|
||||
/tsxExtension.tsx(1,16): 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("./module.mjs")' call instead.
|
||||
To convert this file to an ECMAScript module, add the field `"type": "module"` to '/package.json'.
|
||||
|
||||
|
||||
==== /package.json (0 errors) ====
|
||||
{}
|
||||
|
||||
==== /module.mts (0 errors) ====
|
||||
export {};
|
||||
|
||||
==== /tsExtension.ts (1 errors) ====
|
||||
import {} from "./module.mjs";
|
||||
~~~~~~~~~~~~~~
|
||||
!!! 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("./module.mjs")' call instead.
|
||||
!!! error TS1479: To convert this file to an ECMAScript module, change its file extension to '.mts', or add the field `"type": "module"` to '/package.json'.
|
||||
|
||||
==== /jsExtension.js (1 errors) ====
|
||||
import {} from "./module.mjs";
|
||||
~~~~~~~~~~~~~~
|
||||
!!! 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("./module.mjs")' call instead.
|
||||
!!! error TS1479: To convert this file to an ECMAScript module, change its file extension to '.mjs', or add the field `"type": "module"` to '/package.json'.
|
||||
|
||||
==== /ctsExtension.cts (1 errors) ====
|
||||
import {} from "./module.mjs";
|
||||
~~~~~~~~~~~~~~
|
||||
!!! 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("./module.mjs")' call instead.
|
||||
|
||||
==== /tsxExtension.tsx (1 errors) ====
|
||||
import {} from "./module.mjs";
|
||||
~~~~~~~~~~~~~~
|
||||
!!! 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("./module.mjs")' call instead.
|
||||
!!! error TS1479: To convert this file to an ECMAScript module, add the field `"type": "module"` to '/package.json'.
|
||||
|
||||
@@ -0,0 +1,38 @@
|
||||
/ctsExtension.cts(1,16): 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("./module.mjs")' call instead.
|
||||
/jsExtension.js(1,16): 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("./module.mjs")' call instead.
|
||||
To convert this file to an ECMAScript module, change its file extension to '.mjs' or create a local package.json file with `{ "type": "module" }`.
|
||||
/tsExtension.ts(1,16): 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("./module.mjs")' call instead.
|
||||
To convert this file to an ECMAScript module, change its file extension to '.mts' or create a local package.json file with `{ "type": "module" }`.
|
||||
/tsxExtension.tsx(1,16): 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("./module.mjs")' call instead.
|
||||
To convert this file to an ECMAScript module, create a local package.json file with `{ "type": "module" }`.
|
||||
|
||||
|
||||
==== /package.json (0 errors) ====
|
||||
{ "type": "commonjs" }
|
||||
|
||||
==== /module.mts (0 errors) ====
|
||||
export {};
|
||||
|
||||
==== /tsExtension.ts (1 errors) ====
|
||||
import {} from "./module.mjs";
|
||||
~~~~~~~~~~~~~~
|
||||
!!! 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("./module.mjs")' call instead.
|
||||
!!! error TS1479: To convert this file to an ECMAScript module, change its file extension to '.mts' or create a local package.json file with `{ "type": "module" }`.
|
||||
|
||||
==== /jsExtension.js (1 errors) ====
|
||||
import {} from "./module.mjs";
|
||||
~~~~~~~~~~~~~~
|
||||
!!! 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("./module.mjs")' call instead.
|
||||
!!! error TS1479: To convert this file to an ECMAScript module, change its file extension to '.mjs' or create a local package.json file with `{ "type": "module" }`.
|
||||
|
||||
==== /ctsExtension.cts (1 errors) ====
|
||||
import {} from "./module.mjs";
|
||||
~~~~~~~~~~~~~~
|
||||
!!! 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("./module.mjs")' call instead.
|
||||
|
||||
==== /tsxExtension.tsx (1 errors) ====
|
||||
import {} from "./module.mjs";
|
||||
~~~~~~~~~~~~~~
|
||||
!!! 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("./module.mjs")' call instead.
|
||||
!!! error TS1479: To convert this file to an ECMAScript module, create a local package.json file with `{ "type": "module" }`.
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
/ctsExtension.cts(1,16): 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("./module.mjs")' call instead.
|
||||
|
||||
|
||||
==== /package.json (0 errors) ====
|
||||
{ "type": "module" }
|
||||
|
||||
==== /module.mts (0 errors) ====
|
||||
export {};
|
||||
|
||||
==== /tsExtension.ts (0 errors) ====
|
||||
import {} from "./module.mjs";
|
||||
|
||||
==== /jsExtension.js (0 errors) ====
|
||||
import {} from "./module.mjs";
|
||||
|
||||
==== /ctsExtension.cts (1 errors) ====
|
||||
import {} from "./module.mjs";
|
||||
~~~~~~~~~~~~~~
|
||||
!!! 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("./module.mjs")' call instead.
|
||||
|
||||
==== /tsxExtension.tsx (0 errors) ====
|
||||
import {} from "./module.mjs";
|
||||
|
||||
@@ -0,0 +1,35 @@
|
||||
/ctsExtension.cts(1,16): 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("./module.mjs")' call instead.
|
||||
/jsExtension.js(1,16): 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("./module.mjs")' call instead.
|
||||
To convert this file to an ECMAScript module, change its file extension to '.mjs' or create a local package.json file with `{ "type": "module" }`.
|
||||
/tsExtension.ts(1,16): 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("./module.mjs")' call instead.
|
||||
To convert this file to an ECMAScript module, change its file extension to '.mts' or create a local package.json file with `{ "type": "module" }`.
|
||||
/tsxExtension.tsx(1,16): 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("./module.mjs")' call instead.
|
||||
To convert this file to an ECMAScript module, create a local package.json file with `{ "type": "module" }`.
|
||||
|
||||
|
||||
==== /module.mts (0 errors) ====
|
||||
export {};
|
||||
|
||||
==== /tsExtension.ts (1 errors) ====
|
||||
import {} from "./module.mjs";
|
||||
~~~~~~~~~~~~~~
|
||||
!!! 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("./module.mjs")' call instead.
|
||||
!!! error TS1479: To convert this file to an ECMAScript module, change its file extension to '.mts' or create a local package.json file with `{ "type": "module" }`.
|
||||
|
||||
==== /jsExtension.js (1 errors) ====
|
||||
import {} from "./module.mjs";
|
||||
~~~~~~~~~~~~~~
|
||||
!!! 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("./module.mjs")' call instead.
|
||||
!!! error TS1479: To convert this file to an ECMAScript module, change its file extension to '.mjs' or create a local package.json file with `{ "type": "module" }`.
|
||||
|
||||
==== /ctsExtension.cts (1 errors) ====
|
||||
import {} from "./module.mjs";
|
||||
~~~~~~~~~~~~~~
|
||||
!!! 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("./module.mjs")' call instead.
|
||||
|
||||
==== /tsxExtension.tsx (1 errors) ====
|
||||
import {} from "./module.mjs";
|
||||
~~~~~~~~~~~~~~
|
||||
!!! 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("./module.mjs")' call instead.
|
||||
!!! error TS1479: To convert this file to an ECMAScript module, create a local package.json file with `{ "type": "module" }`.
|
||||
|
||||
+4
-4
@@ -1,6 +1,6 @@
|
||||
error TS2209: The project root is ambiguous, but is required to resolve export map entry '.' in file 'tests/cases/conformance/node/package.json'. Supply the `rootDir` compiler option to disambiguate.
|
||||
tests/cases/conformance/node/index.cts(3,22): error TS1471: Module 'package/mjs' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
tests/cases/conformance/node/index.cts(4,23): error TS1471: Module 'package' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
tests/cases/conformance/node/index.cts(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.
|
||||
tests/cases/conformance/node/index.cts(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.
|
||||
tests/cases/conformance/node/node_modules/inner/index.d.mts(2,13): error TS2303: Circular definition of import alias 'cjs'.
|
||||
tests/cases/conformance/node/node_modules/inner/index.d.ts(2,13): error TS2303: Circular definition of import alias 'cjs'.
|
||||
|
||||
@@ -43,10 +43,10 @@ tests/cases/conformance/node/node_modules/inner/index.d.ts(2,13): error TS2303:
|
||||
import * as cjs from "package/cjs";
|
||||
import * as mjs from "package/mjs";
|
||||
~~~~~~~~~~~~~
|
||||
!!! error TS1471: Module 'package/mjs' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
!!! 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.
|
||||
import * as type from "package";
|
||||
~~~~~~~~~
|
||||
!!! error TS1471: Module 'package' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
!!! 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.
|
||||
cjs;
|
||||
mjs;
|
||||
type;
|
||||
|
||||
+4
-4
@@ -1,6 +1,6 @@
|
||||
error TS2209: The project root is ambiguous, but is required to resolve export map entry '.' in file 'tests/cases/conformance/node/package.json'. Supply the `rootDir` compiler option to disambiguate.
|
||||
tests/cases/conformance/node/index.cts(3,22): error TS1471: Module 'package/mjs' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
tests/cases/conformance/node/index.cts(4,23): error TS1471: Module 'package' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
tests/cases/conformance/node/index.cts(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.
|
||||
tests/cases/conformance/node/index.cts(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.
|
||||
tests/cases/conformance/node/node_modules/inner/index.d.mts(2,13): error TS2303: Circular definition of import alias 'cjs'.
|
||||
tests/cases/conformance/node/node_modules/inner/index.d.ts(2,13): error TS2303: Circular definition of import alias 'cjs'.
|
||||
|
||||
@@ -43,10 +43,10 @@ tests/cases/conformance/node/node_modules/inner/index.d.ts(2,13): error TS2303:
|
||||
import * as cjs from "package/cjs";
|
||||
import * as mjs from "package/mjs";
|
||||
~~~~~~~~~~~~~
|
||||
!!! error TS1471: Module 'package/mjs' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
!!! 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.
|
||||
import * as type from "package";
|
||||
~~~~~~~~~
|
||||
!!! error TS1471: Module 'package' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
!!! 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.
|
||||
cjs;
|
||||
mjs;
|
||||
type;
|
||||
|
||||
+10
-10
@@ -1,11 +1,11 @@
|
||||
error TS2209: The project root is ambiguous, but is required to resolve export map entry '.' in file 'tests/cases/conformance/node/package.json'. Supply the `rootDir` compiler option to disambiguate.
|
||||
tests/cases/conformance/node/index.cts(3,22): error TS1471: Module 'package/mjs' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
tests/cases/conformance/node/index.cts(4,23): error TS1471: Module 'package' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
tests/cases/conformance/node/index.cts(9,23): error TS1471: Module 'inner/mjs' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
tests/cases/conformance/node/node_modules/inner/index.d.cts(3,22): error TS1471: Module 'inner/mjs' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
tests/cases/conformance/node/index.cts(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.
|
||||
tests/cases/conformance/node/index.cts(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.
|
||||
tests/cases/conformance/node/index.cts(9,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("inner/mjs")' call instead.
|
||||
tests/cases/conformance/node/node_modules/inner/index.d.cts(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("inner/mjs")' call instead.
|
||||
tests/cases/conformance/node/node_modules/inner/index.d.cts(5,1): error TS1036: Statements are not allowed in ambient contexts.
|
||||
tests/cases/conformance/node/node_modules/inner/index.d.mts(5,1): error TS1036: Statements are not allowed in ambient contexts.
|
||||
tests/cases/conformance/node/node_modules/inner/index.d.ts(3,22): error TS1471: Module 'inner/mjs' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
tests/cases/conformance/node/node_modules/inner/index.d.ts(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("inner/mjs")' call instead.
|
||||
tests/cases/conformance/node/node_modules/inner/index.d.ts(5,1): error TS1036: Statements are not allowed in ambient contexts.
|
||||
|
||||
|
||||
@@ -43,17 +43,17 @@ tests/cases/conformance/node/node_modules/inner/index.d.ts(5,1): error TS1036: S
|
||||
import * as cjs from "package/cjs";
|
||||
import * as mjs from "package/mjs";
|
||||
~~~~~~~~~~~~~
|
||||
!!! error TS1471: Module 'package/mjs' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
!!! 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.
|
||||
import * as type from "package";
|
||||
~~~~~~~~~
|
||||
!!! error TS1471: Module 'package' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
!!! 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.
|
||||
export const a = cjs;
|
||||
export const b = mjs;
|
||||
export const c = type;
|
||||
import * as cjsi from "inner/cjs";
|
||||
import * as mjsi from "inner/mjs";
|
||||
~~~~~~~~~~~
|
||||
!!! error TS1471: Module 'inner/mjs' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
!!! 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("inner/mjs")' call instead.
|
||||
import * as typei from "inner";
|
||||
export const d = cjsi;
|
||||
export const e = mjsi;
|
||||
@@ -63,7 +63,7 @@ tests/cases/conformance/node/node_modules/inner/index.d.ts(5,1): error TS1036: S
|
||||
import * as cjs from "inner/cjs";
|
||||
import * as mjs from "inner/mjs";
|
||||
~~~~~~~~~~~
|
||||
!!! error TS1471: Module 'inner/mjs' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
!!! 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("inner/mjs")' call instead.
|
||||
import * as type from "inner";
|
||||
cjs;
|
||||
~~~
|
||||
@@ -87,7 +87,7 @@ tests/cases/conformance/node/node_modules/inner/index.d.ts(5,1): error TS1036: S
|
||||
import * as cjs from "inner/cjs";
|
||||
import * as mjs from "inner/mjs";
|
||||
~~~~~~~~~~~
|
||||
!!! error TS1471: Module 'inner/mjs' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
!!! 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("inner/mjs")' call instead.
|
||||
import * as type from "inner";
|
||||
cjs;
|
||||
~~~
|
||||
|
||||
+10
-10
@@ -1,11 +1,11 @@
|
||||
error TS2209: The project root is ambiguous, but is required to resolve export map entry '.' in file 'tests/cases/conformance/node/package.json'. Supply the `rootDir` compiler option to disambiguate.
|
||||
tests/cases/conformance/node/index.cts(3,22): error TS1471: Module 'package/mjs' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
tests/cases/conformance/node/index.cts(4,23): error TS1471: Module 'package' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
tests/cases/conformance/node/index.cts(9,23): error TS1471: Module 'inner/mjs' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
tests/cases/conformance/node/node_modules/inner/index.d.cts(3,22): error TS1471: Module 'inner/mjs' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
tests/cases/conformance/node/index.cts(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.
|
||||
tests/cases/conformance/node/index.cts(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.
|
||||
tests/cases/conformance/node/index.cts(9,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("inner/mjs")' call instead.
|
||||
tests/cases/conformance/node/node_modules/inner/index.d.cts(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("inner/mjs")' call instead.
|
||||
tests/cases/conformance/node/node_modules/inner/index.d.cts(5,1): error TS1036: Statements are not allowed in ambient contexts.
|
||||
tests/cases/conformance/node/node_modules/inner/index.d.mts(5,1): error TS1036: Statements are not allowed in ambient contexts.
|
||||
tests/cases/conformance/node/node_modules/inner/index.d.ts(3,22): error TS1471: Module 'inner/mjs' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
tests/cases/conformance/node/node_modules/inner/index.d.ts(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("inner/mjs")' call instead.
|
||||
tests/cases/conformance/node/node_modules/inner/index.d.ts(5,1): error TS1036: Statements are not allowed in ambient contexts.
|
||||
|
||||
|
||||
@@ -43,17 +43,17 @@ tests/cases/conformance/node/node_modules/inner/index.d.ts(5,1): error TS1036: S
|
||||
import * as cjs from "package/cjs";
|
||||
import * as mjs from "package/mjs";
|
||||
~~~~~~~~~~~~~
|
||||
!!! error TS1471: Module 'package/mjs' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
!!! 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.
|
||||
import * as type from "package";
|
||||
~~~~~~~~~
|
||||
!!! error TS1471: Module 'package' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
!!! 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.
|
||||
export const a = cjs;
|
||||
export const b = mjs;
|
||||
export const c = type;
|
||||
import * as cjsi from "inner/cjs";
|
||||
import * as mjsi from "inner/mjs";
|
||||
~~~~~~~~~~~
|
||||
!!! error TS1471: Module 'inner/mjs' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
!!! 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("inner/mjs")' call instead.
|
||||
import * as typei from "inner";
|
||||
export const d = cjsi;
|
||||
export const e = mjsi;
|
||||
@@ -63,7 +63,7 @@ tests/cases/conformance/node/node_modules/inner/index.d.ts(5,1): error TS1036: S
|
||||
import * as cjs from "inner/cjs";
|
||||
import * as mjs from "inner/mjs";
|
||||
~~~~~~~~~~~
|
||||
!!! error TS1471: Module 'inner/mjs' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
!!! 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("inner/mjs")' call instead.
|
||||
import * as type from "inner";
|
||||
cjs;
|
||||
~~~
|
||||
@@ -87,7 +87,7 @@ tests/cases/conformance/node/node_modules/inner/index.d.ts(5,1): error TS1036: S
|
||||
import * as cjs from "inner/cjs";
|
||||
import * as mjs from "inner/mjs";
|
||||
~~~~~~~~~~~
|
||||
!!! error TS1471: Module 'inner/mjs' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
!!! 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("inner/mjs")' call instead.
|
||||
import * as type from "inner";
|
||||
cjs;
|
||||
~~~
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
error TS2209: The project root is ambiguous, but is required to resolve export map entry '.' in file 'tests/cases/conformance/node/package.json'. Supply the `rootDir` compiler option to disambiguate.
|
||||
tests/cases/conformance/node/index.cts(3,22): error TS1471: Module 'package/mjs' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
tests/cases/conformance/node/index.cts(4,23): error TS1471: Module 'package' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
tests/cases/conformance/node/index.cts(9,23): error TS1471: Module 'inner/mjs' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
tests/cases/conformance/node/node_modules/inner/index.d.cts(3,22): error TS1471: Module 'inner/mjs' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
tests/cases/conformance/node/index.cts(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.
|
||||
tests/cases/conformance/node/index.cts(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.
|
||||
tests/cases/conformance/node/index.cts(9,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("inner/mjs")' call instead.
|
||||
tests/cases/conformance/node/node_modules/inner/index.d.cts(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("inner/mjs")' call instead.
|
||||
tests/cases/conformance/node/node_modules/inner/index.d.ts(2,13): error TS2303: Circular definition of import alias 'cjs'.
|
||||
tests/cases/conformance/node/node_modules/inner/index.d.ts(3,22): error TS1471: Module 'inner/mjs' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
tests/cases/conformance/node/node_modules/inner/index.d.ts(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("inner/mjs")' call instead.
|
||||
|
||||
|
||||
!!! error TS2209: The project root is ambiguous, but is required to resolve export map entry '.' in file 'tests/cases/conformance/node/package.json'. Supply the `rootDir` compiler option to disambiguate.
|
||||
@@ -41,17 +41,17 @@ tests/cases/conformance/node/node_modules/inner/index.d.ts(3,22): error TS1471:
|
||||
import * as cjs from "package/cjs";
|
||||
import * as mjs from "package/mjs";
|
||||
~~~~~~~~~~~~~
|
||||
!!! error TS1471: Module 'package/mjs' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
!!! 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.
|
||||
import * as type from "package";
|
||||
~~~~~~~~~
|
||||
!!! error TS1471: Module 'package' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
!!! 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.
|
||||
cjs;
|
||||
mjs;
|
||||
type;
|
||||
import * as cjsi from "inner/cjs";
|
||||
import * as mjsi from "inner/mjs";
|
||||
~~~~~~~~~~~
|
||||
!!! error TS1471: Module 'inner/mjs' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
!!! 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("inner/mjs")' call instead.
|
||||
import * as typei from "inner";
|
||||
cjsi;
|
||||
mjsi;
|
||||
@@ -63,7 +63,7 @@ tests/cases/conformance/node/node_modules/inner/index.d.ts(3,22): error TS1471:
|
||||
!!! error TS2303: Circular definition of import alias 'cjs'.
|
||||
import * as mjs from "inner/mjs";
|
||||
~~~~~~~~~~~
|
||||
!!! error TS1471: Module 'inner/mjs' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
!!! 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("inner/mjs")' call instead.
|
||||
import * as type from "inner";
|
||||
export { cjs };
|
||||
export { mjs };
|
||||
@@ -81,7 +81,7 @@ tests/cases/conformance/node/node_modules/inner/index.d.ts(3,22): error TS1471:
|
||||
import * as cjs from "inner/cjs";
|
||||
import * as mjs from "inner/mjs";
|
||||
~~~~~~~~~~~
|
||||
!!! error TS1471: Module 'inner/mjs' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
!!! 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("inner/mjs")' call instead.
|
||||
import * as type from "inner";
|
||||
export { cjs };
|
||||
export { mjs };
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
error TS2209: The project root is ambiguous, but is required to resolve export map entry '.' in file 'tests/cases/conformance/node/package.json'. Supply the `rootDir` compiler option to disambiguate.
|
||||
tests/cases/conformance/node/index.cts(3,22): error TS1471: Module 'package/mjs' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
tests/cases/conformance/node/index.cts(4,23): error TS1471: Module 'package' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
tests/cases/conformance/node/index.cts(9,23): error TS1471: Module 'inner/mjs' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
tests/cases/conformance/node/node_modules/inner/index.d.cts(3,22): error TS1471: Module 'inner/mjs' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
tests/cases/conformance/node/index.cts(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.
|
||||
tests/cases/conformance/node/index.cts(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.
|
||||
tests/cases/conformance/node/index.cts(9,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("inner/mjs")' call instead.
|
||||
tests/cases/conformance/node/node_modules/inner/index.d.cts(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("inner/mjs")' call instead.
|
||||
tests/cases/conformance/node/node_modules/inner/index.d.ts(2,13): error TS2303: Circular definition of import alias 'cjs'.
|
||||
tests/cases/conformance/node/node_modules/inner/index.d.ts(3,22): error TS1471: Module 'inner/mjs' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
tests/cases/conformance/node/node_modules/inner/index.d.ts(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("inner/mjs")' call instead.
|
||||
|
||||
|
||||
!!! error TS2209: The project root is ambiguous, but is required to resolve export map entry '.' in file 'tests/cases/conformance/node/package.json'. Supply the `rootDir` compiler option to disambiguate.
|
||||
@@ -41,17 +41,17 @@ tests/cases/conformance/node/node_modules/inner/index.d.ts(3,22): error TS1471:
|
||||
import * as cjs from "package/cjs";
|
||||
import * as mjs from "package/mjs";
|
||||
~~~~~~~~~~~~~
|
||||
!!! error TS1471: Module 'package/mjs' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
!!! 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.
|
||||
import * as type from "package";
|
||||
~~~~~~~~~
|
||||
!!! error TS1471: Module 'package' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
!!! 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.
|
||||
cjs;
|
||||
mjs;
|
||||
type;
|
||||
import * as cjsi from "inner/cjs";
|
||||
import * as mjsi from "inner/mjs";
|
||||
~~~~~~~~~~~
|
||||
!!! error TS1471: Module 'inner/mjs' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
!!! 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("inner/mjs")' call instead.
|
||||
import * as typei from "inner";
|
||||
cjsi;
|
||||
mjsi;
|
||||
@@ -63,7 +63,7 @@ tests/cases/conformance/node/node_modules/inner/index.d.ts(3,22): error TS1471:
|
||||
!!! error TS2303: Circular definition of import alias 'cjs'.
|
||||
import * as mjs from "inner/mjs";
|
||||
~~~~~~~~~~~
|
||||
!!! error TS1471: Module 'inner/mjs' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
!!! 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("inner/mjs")' call instead.
|
||||
import * as type from "inner";
|
||||
export { cjs };
|
||||
export { mjs };
|
||||
@@ -81,7 +81,7 @@ tests/cases/conformance/node/node_modules/inner/index.d.ts(3,22): error TS1471:
|
||||
import * as cjs from "inner/cjs";
|
||||
import * as mjs from "inner/mjs";
|
||||
~~~~~~~~~~~
|
||||
!!! error TS1471: Module 'inner/mjs' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
!!! 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("inner/mjs")' call instead.
|
||||
import * as type from "inner";
|
||||
export { cjs };
|
||||
export { mjs };
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
tests/cases/conformance/node/index.cts(3,22): error TS1471: Module '#mjs' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
tests/cases/conformance/node/index.cts(4,23): error TS1471: Module '#type' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
tests/cases/conformance/node/index.cts(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("#mjs")' call instead.
|
||||
tests/cases/conformance/node/index.cts(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("#type")' call instead.
|
||||
|
||||
|
||||
==== tests/cases/conformance/node/index.ts (0 errors) ====
|
||||
@@ -23,10 +23,10 @@ tests/cases/conformance/node/index.cts(4,23): error TS1471: Module '#type' canno
|
||||
import * as cjs from "#cjs";
|
||||
import * as mjs from "#mjs";
|
||||
~~~~~~
|
||||
!!! error TS1471: Module '#mjs' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
!!! 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("#mjs")' call instead.
|
||||
import * as type from "#type";
|
||||
~~~~~~~
|
||||
!!! error TS1471: Module '#type' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
!!! 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("#type")' call instead.
|
||||
cjs;
|
||||
mjs;
|
||||
type;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
tests/cases/conformance/node/index.cts(3,22): error TS1471: Module '#mjs' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
tests/cases/conformance/node/index.cts(4,23): error TS1471: Module '#type' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
tests/cases/conformance/node/index.cts(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("#mjs")' call instead.
|
||||
tests/cases/conformance/node/index.cts(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("#type")' call instead.
|
||||
|
||||
|
||||
==== tests/cases/conformance/node/index.ts (0 errors) ====
|
||||
@@ -23,10 +23,10 @@ tests/cases/conformance/node/index.cts(4,23): error TS1471: Module '#type' canno
|
||||
import * as cjs from "#cjs";
|
||||
import * as mjs from "#mjs";
|
||||
~~~~~~
|
||||
!!! error TS1471: Module '#mjs' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
!!! 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("#mjs")' call instead.
|
||||
import * as type from "#type";
|
||||
~~~~~~~
|
||||
!!! error TS1471: Module '#type' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
!!! 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("#type")' call instead.
|
||||
cjs;
|
||||
mjs;
|
||||
type;
|
||||
|
||||
+6
-6
@@ -1,7 +1,7 @@
|
||||
tests/cases/conformance/node/index.cts(3,23): error TS1471: Module 'inner/mjs/index' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
tests/cases/conformance/node/node_modules/inner/index.d.cts(3,22): error TS1471: Module 'inner/mjs/index' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
tests/cases/conformance/node/index.cts(3,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("inner/mjs/index")' call instead.
|
||||
tests/cases/conformance/node/node_modules/inner/index.d.cts(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("inner/mjs/index")' call instead.
|
||||
tests/cases/conformance/node/node_modules/inner/index.d.ts(2,13): error TS2303: Circular definition of import alias 'cjs'.
|
||||
tests/cases/conformance/node/node_modules/inner/index.d.ts(3,22): error TS1471: Module 'inner/mjs/index' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
tests/cases/conformance/node/node_modules/inner/index.d.ts(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("inner/mjs/index")' call instead.
|
||||
|
||||
|
||||
==== tests/cases/conformance/node/index.ts (0 errors) ====
|
||||
@@ -25,7 +25,7 @@ tests/cases/conformance/node/node_modules/inner/index.d.ts(3,22): error TS1471:
|
||||
import * as cjsi from "inner/cjs/index";
|
||||
import * as mjsi from "inner/mjs/index";
|
||||
~~~~~~~~~~~~~~~~~
|
||||
!!! error TS1471: Module 'inner/mjs/index' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
!!! 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("inner/mjs/index")' call instead.
|
||||
import * as typei from "inner/js/index";
|
||||
cjsi;
|
||||
mjsi;
|
||||
@@ -37,7 +37,7 @@ tests/cases/conformance/node/node_modules/inner/index.d.ts(3,22): error TS1471:
|
||||
!!! error TS2303: Circular definition of import alias 'cjs'.
|
||||
import * as mjs from "inner/mjs/index";
|
||||
~~~~~~~~~~~~~~~~~
|
||||
!!! error TS1471: Module 'inner/mjs/index' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
!!! 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("inner/mjs/index")' call instead.
|
||||
import * as type from "inner/js/index";
|
||||
export { cjs };
|
||||
export { mjs };
|
||||
@@ -55,7 +55,7 @@ tests/cases/conformance/node/node_modules/inner/index.d.ts(3,22): error TS1471:
|
||||
import * as cjs from "inner/cjs/index";
|
||||
import * as mjs from "inner/mjs/index";
|
||||
~~~~~~~~~~~~~~~~~
|
||||
!!! error TS1471: Module 'inner/mjs/index' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
!!! 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("inner/mjs/index")' call instead.
|
||||
import * as type from "inner/js/index";
|
||||
export { cjs };
|
||||
export { mjs };
|
||||
|
||||
+6
-6
@@ -1,7 +1,7 @@
|
||||
tests/cases/conformance/node/index.cts(3,23): error TS1471: Module 'inner/mjs/index' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
tests/cases/conformance/node/node_modules/inner/index.d.cts(3,22): error TS1471: Module 'inner/mjs/index' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
tests/cases/conformance/node/index.cts(3,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("inner/mjs/index")' call instead.
|
||||
tests/cases/conformance/node/node_modules/inner/index.d.cts(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("inner/mjs/index")' call instead.
|
||||
tests/cases/conformance/node/node_modules/inner/index.d.ts(2,13): error TS2303: Circular definition of import alias 'cjs'.
|
||||
tests/cases/conformance/node/node_modules/inner/index.d.ts(3,22): error TS1471: Module 'inner/mjs/index' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
tests/cases/conformance/node/node_modules/inner/index.d.ts(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("inner/mjs/index")' call instead.
|
||||
|
||||
|
||||
==== tests/cases/conformance/node/index.ts (0 errors) ====
|
||||
@@ -25,7 +25,7 @@ tests/cases/conformance/node/node_modules/inner/index.d.ts(3,22): error TS1471:
|
||||
import * as cjsi from "inner/cjs/index";
|
||||
import * as mjsi from "inner/mjs/index";
|
||||
~~~~~~~~~~~~~~~~~
|
||||
!!! error TS1471: Module 'inner/mjs/index' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
!!! 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("inner/mjs/index")' call instead.
|
||||
import * as typei from "inner/js/index";
|
||||
cjsi;
|
||||
mjsi;
|
||||
@@ -37,7 +37,7 @@ tests/cases/conformance/node/node_modules/inner/index.d.ts(3,22): error TS1471:
|
||||
!!! error TS2303: Circular definition of import alias 'cjs'.
|
||||
import * as mjs from "inner/mjs/index";
|
||||
~~~~~~~~~~~~~~~~~
|
||||
!!! error TS1471: Module 'inner/mjs/index' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
!!! 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("inner/mjs/index")' call instead.
|
||||
import * as type from "inner/js/index";
|
||||
export { cjs };
|
||||
export { mjs };
|
||||
@@ -55,7 +55,7 @@ tests/cases/conformance/node/node_modules/inner/index.d.ts(3,22): error TS1471:
|
||||
import * as cjs from "inner/cjs/index";
|
||||
import * as mjs from "inner/mjs/index";
|
||||
~~~~~~~~~~~~~~~~~
|
||||
!!! error TS1471: Module 'inner/mjs/index' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
!!! 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("inner/mjs/index")' call instead.
|
||||
import * as type from "inner/js/index";
|
||||
export { cjs };
|
||||
export { mjs };
|
||||
|
||||
+6
-6
@@ -1,7 +1,7 @@
|
||||
tests/cases/conformance/node/index.cts(2,23): error TS2307: Cannot find module 'inner/cjs/exclude/index' or its corresponding type declarations.
|
||||
tests/cases/conformance/node/index.cts(3,23): error TS2307: Cannot find module 'inner/mjs/exclude/index' or its corresponding type declarations.
|
||||
tests/cases/conformance/node/index.cts(4,24): error TS2307: Cannot find module 'inner/js/exclude/index' or its corresponding type declarations.
|
||||
tests/cases/conformance/node/index.cts(9,24): error TS1471: Module 'inner/mjs/index' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
tests/cases/conformance/node/index.cts(9,24): 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("inner/mjs/index")' call instead.
|
||||
tests/cases/conformance/node/index.mts(2,23): error TS2307: Cannot find module 'inner/cjs/exclude/index' or its corresponding type declarations.
|
||||
tests/cases/conformance/node/index.mts(3,23): error TS2307: Cannot find module 'inner/mjs/exclude/index' or its corresponding type declarations.
|
||||
tests/cases/conformance/node/index.mts(4,24): error TS2307: Cannot find module 'inner/js/exclude/index' or its corresponding type declarations.
|
||||
@@ -17,9 +17,9 @@ tests/cases/conformance/node/node_modules/inner/exclude/index.d.mts(4,23): error
|
||||
tests/cases/conformance/node/node_modules/inner/exclude/index.d.ts(2,22): error TS2307: Cannot find module 'inner/cjs/exclude/index' or its corresponding type declarations.
|
||||
tests/cases/conformance/node/node_modules/inner/exclude/index.d.ts(3,22): error TS2307: Cannot find module 'inner/mjs/exclude/index' or its corresponding type declarations.
|
||||
tests/cases/conformance/node/node_modules/inner/exclude/index.d.ts(4,23): error TS2307: Cannot find module 'inner/js/exclude/index' or its corresponding type declarations.
|
||||
tests/cases/conformance/node/node_modules/inner/index.d.cts(3,22): error TS1471: Module 'inner/mjs/index' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
tests/cases/conformance/node/node_modules/inner/index.d.cts(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("inner/mjs/index")' call instead.
|
||||
tests/cases/conformance/node/node_modules/inner/index.d.ts(2,13): error TS2303: Circular definition of import alias 'cjs'.
|
||||
tests/cases/conformance/node/node_modules/inner/index.d.ts(3,22): error TS1471: Module 'inner/mjs/index' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
tests/cases/conformance/node/node_modules/inner/index.d.ts(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("inner/mjs/index")' call instead.
|
||||
|
||||
|
||||
==== tests/cases/conformance/node/index.ts (3 errors) ====
|
||||
@@ -79,7 +79,7 @@ tests/cases/conformance/node/node_modules/inner/index.d.ts(3,22): error TS1471:
|
||||
import * as cjsi2 from "inner/cjs/index";
|
||||
import * as mjsi2 from "inner/mjs/index";
|
||||
~~~~~~~~~~~~~~~~~
|
||||
!!! error TS1471: Module 'inner/mjs/index' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
!!! 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("inner/mjs/index")' call instead.
|
||||
import * as typei2 from "inner/js/index";
|
||||
cjsi2;
|
||||
mjsi2;
|
||||
@@ -133,7 +133,7 @@ tests/cases/conformance/node/node_modules/inner/index.d.ts(3,22): error TS1471:
|
||||
!!! error TS2303: Circular definition of import alias 'cjs'.
|
||||
import * as mjs from "inner/mjs/index";
|
||||
~~~~~~~~~~~~~~~~~
|
||||
!!! error TS1471: Module 'inner/mjs/index' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
!!! 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("inner/mjs/index")' call instead.
|
||||
import * as type from "inner/js/index";
|
||||
export { cjs };
|
||||
export { mjs };
|
||||
@@ -151,7 +151,7 @@ tests/cases/conformance/node/node_modules/inner/index.d.ts(3,22): error TS1471:
|
||||
import * as cjs from "inner/cjs/index";
|
||||
import * as mjs from "inner/mjs/index";
|
||||
~~~~~~~~~~~~~~~~~
|
||||
!!! error TS1471: Module 'inner/mjs/index' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
!!! 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("inner/mjs/index")' call instead.
|
||||
import * as type from "inner/js/index";
|
||||
export { cjs };
|
||||
export { mjs };
|
||||
|
||||
+6
-6
@@ -1,7 +1,7 @@
|
||||
tests/cases/conformance/node/index.cts(2,23): error TS2307: Cannot find module 'inner/cjs/exclude/index' or its corresponding type declarations.
|
||||
tests/cases/conformance/node/index.cts(3,23): error TS2307: Cannot find module 'inner/mjs/exclude/index' or its corresponding type declarations.
|
||||
tests/cases/conformance/node/index.cts(4,24): error TS2307: Cannot find module 'inner/js/exclude/index' or its corresponding type declarations.
|
||||
tests/cases/conformance/node/index.cts(9,24): error TS1471: Module 'inner/mjs/index' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
tests/cases/conformance/node/index.cts(9,24): 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("inner/mjs/index")' call instead.
|
||||
tests/cases/conformance/node/index.mts(2,23): error TS2307: Cannot find module 'inner/cjs/exclude/index' or its corresponding type declarations.
|
||||
tests/cases/conformance/node/index.mts(3,23): error TS2307: Cannot find module 'inner/mjs/exclude/index' or its corresponding type declarations.
|
||||
tests/cases/conformance/node/index.mts(4,24): error TS2307: Cannot find module 'inner/js/exclude/index' or its corresponding type declarations.
|
||||
@@ -17,9 +17,9 @@ tests/cases/conformance/node/node_modules/inner/exclude/index.d.mts(4,23): error
|
||||
tests/cases/conformance/node/node_modules/inner/exclude/index.d.ts(2,22): error TS2307: Cannot find module 'inner/cjs/exclude/index' or its corresponding type declarations.
|
||||
tests/cases/conformance/node/node_modules/inner/exclude/index.d.ts(3,22): error TS2307: Cannot find module 'inner/mjs/exclude/index' or its corresponding type declarations.
|
||||
tests/cases/conformance/node/node_modules/inner/exclude/index.d.ts(4,23): error TS2307: Cannot find module 'inner/js/exclude/index' or its corresponding type declarations.
|
||||
tests/cases/conformance/node/node_modules/inner/index.d.cts(3,22): error TS1471: Module 'inner/mjs/index' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
tests/cases/conformance/node/node_modules/inner/index.d.cts(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("inner/mjs/index")' call instead.
|
||||
tests/cases/conformance/node/node_modules/inner/index.d.ts(2,13): error TS2303: Circular definition of import alias 'cjs'.
|
||||
tests/cases/conformance/node/node_modules/inner/index.d.ts(3,22): error TS1471: Module 'inner/mjs/index' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
tests/cases/conformance/node/node_modules/inner/index.d.ts(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("inner/mjs/index")' call instead.
|
||||
|
||||
|
||||
==== tests/cases/conformance/node/index.ts (3 errors) ====
|
||||
@@ -79,7 +79,7 @@ tests/cases/conformance/node/node_modules/inner/index.d.ts(3,22): error TS1471:
|
||||
import * as cjsi2 from "inner/cjs/index";
|
||||
import * as mjsi2 from "inner/mjs/index";
|
||||
~~~~~~~~~~~~~~~~~
|
||||
!!! error TS1471: Module 'inner/mjs/index' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
!!! 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("inner/mjs/index")' call instead.
|
||||
import * as typei2 from "inner/js/index";
|
||||
cjsi2;
|
||||
mjsi2;
|
||||
@@ -133,7 +133,7 @@ tests/cases/conformance/node/node_modules/inner/index.d.ts(3,22): error TS1471:
|
||||
!!! error TS2303: Circular definition of import alias 'cjs'.
|
||||
import * as mjs from "inner/mjs/index";
|
||||
~~~~~~~~~~~~~~~~~
|
||||
!!! error TS1471: Module 'inner/mjs/index' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
!!! 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("inner/mjs/index")' call instead.
|
||||
import * as type from "inner/js/index";
|
||||
export { cjs };
|
||||
export { mjs };
|
||||
@@ -151,7 +151,7 @@ tests/cases/conformance/node/node_modules/inner/index.d.ts(3,22): error TS1471:
|
||||
import * as cjs from "inner/cjs/index";
|
||||
import * as mjs from "inner/mjs/index";
|
||||
~~~~~~~~~~~~~~~~~
|
||||
!!! error TS1471: Module 'inner/mjs/index' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
!!! 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("inner/mjs/index")' call instead.
|
||||
import * as type from "inner/js/index";
|
||||
export { cjs };
|
||||
export { mjs };
|
||||
|
||||
+6
-6
@@ -1,7 +1,7 @@
|
||||
tests/cases/conformance/node/index.cts(3,23): error TS1471: Module 'inner/mjs/index.mjs' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
tests/cases/conformance/node/node_modules/inner/index.d.cts(3,22): error TS1471: Module 'inner/mjs/index.mjs' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
tests/cases/conformance/node/index.cts(3,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("inner/mjs/index.mjs")' call instead.
|
||||
tests/cases/conformance/node/node_modules/inner/index.d.cts(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("inner/mjs/index.mjs")' call instead.
|
||||
tests/cases/conformance/node/node_modules/inner/index.d.ts(2,13): error TS2303: Circular definition of import alias 'cjs'.
|
||||
tests/cases/conformance/node/node_modules/inner/index.d.ts(3,22): error TS1471: Module 'inner/mjs/index.mjs' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
tests/cases/conformance/node/node_modules/inner/index.d.ts(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("inner/mjs/index.mjs")' call instead.
|
||||
|
||||
|
||||
==== tests/cases/conformance/node/index.ts (0 errors) ====
|
||||
@@ -25,7 +25,7 @@ tests/cases/conformance/node/node_modules/inner/index.d.ts(3,22): error TS1471:
|
||||
import * as cjsi from "inner/cjs/index.cjs";
|
||||
import * as mjsi from "inner/mjs/index.mjs";
|
||||
~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS1471: Module 'inner/mjs/index.mjs' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
!!! 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("inner/mjs/index.mjs")' call instead.
|
||||
import * as typei from "inner/js/index.js";
|
||||
cjsi;
|
||||
mjsi;
|
||||
@@ -37,7 +37,7 @@ tests/cases/conformance/node/node_modules/inner/index.d.ts(3,22): error TS1471:
|
||||
!!! error TS2303: Circular definition of import alias 'cjs'.
|
||||
import * as mjs from "inner/mjs/index.mjs";
|
||||
~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS1471: Module 'inner/mjs/index.mjs' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
!!! 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("inner/mjs/index.mjs")' call instead.
|
||||
import * as type from "inner/js/index.js";
|
||||
export { cjs };
|
||||
export { mjs };
|
||||
@@ -55,7 +55,7 @@ tests/cases/conformance/node/node_modules/inner/index.d.ts(3,22): error TS1471:
|
||||
import * as cjs from "inner/cjs/index.cjs";
|
||||
import * as mjs from "inner/mjs/index.mjs";
|
||||
~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS1471: Module 'inner/mjs/index.mjs' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
!!! 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("inner/mjs/index.mjs")' call instead.
|
||||
import * as type from "inner/js/index.js";
|
||||
export { cjs };
|
||||
export { mjs };
|
||||
|
||||
+6
-6
@@ -1,7 +1,7 @@
|
||||
tests/cases/conformance/node/index.cts(3,23): error TS1471: Module 'inner/mjs/index.mjs' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
tests/cases/conformance/node/node_modules/inner/index.d.cts(3,22): error TS1471: Module 'inner/mjs/index.mjs' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
tests/cases/conformance/node/index.cts(3,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("inner/mjs/index.mjs")' call instead.
|
||||
tests/cases/conformance/node/node_modules/inner/index.d.cts(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("inner/mjs/index.mjs")' call instead.
|
||||
tests/cases/conformance/node/node_modules/inner/index.d.ts(2,13): error TS2303: Circular definition of import alias 'cjs'.
|
||||
tests/cases/conformance/node/node_modules/inner/index.d.ts(3,22): error TS1471: Module 'inner/mjs/index.mjs' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
tests/cases/conformance/node/node_modules/inner/index.d.ts(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("inner/mjs/index.mjs")' call instead.
|
||||
|
||||
|
||||
==== tests/cases/conformance/node/index.ts (0 errors) ====
|
||||
@@ -25,7 +25,7 @@ tests/cases/conformance/node/node_modules/inner/index.d.ts(3,22): error TS1471:
|
||||
import * as cjsi from "inner/cjs/index.cjs";
|
||||
import * as mjsi from "inner/mjs/index.mjs";
|
||||
~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS1471: Module 'inner/mjs/index.mjs' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
!!! 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("inner/mjs/index.mjs")' call instead.
|
||||
import * as typei from "inner/js/index.js";
|
||||
cjsi;
|
||||
mjsi;
|
||||
@@ -37,7 +37,7 @@ tests/cases/conformance/node/node_modules/inner/index.d.ts(3,22): error TS1471:
|
||||
!!! error TS2303: Circular definition of import alias 'cjs'.
|
||||
import * as mjs from "inner/mjs/index.mjs";
|
||||
~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS1471: Module 'inner/mjs/index.mjs' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
!!! 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("inner/mjs/index.mjs")' call instead.
|
||||
import * as type from "inner/js/index.js";
|
||||
export { cjs };
|
||||
export { mjs };
|
||||
@@ -55,7 +55,7 @@ tests/cases/conformance/node/node_modules/inner/index.d.ts(3,22): error TS1471:
|
||||
import * as cjs from "inner/cjs/index.cjs";
|
||||
import * as mjs from "inner/mjs/index.mjs";
|
||||
~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS1471: Module 'inner/mjs/index.mjs' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
!!! 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("inner/mjs/index.mjs")' call instead.
|
||||
import * as type from "inner/js/index.js";
|
||||
export { cjs };
|
||||
export { mjs };
|
||||
|
||||
+8
-6
@@ -1,16 +1,18 @@
|
||||
tests/cases/conformance/node/index.ts(3,22): error TS1471: Module './index.js' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
tests/cases/conformance/node/subfolder/index.ts(2,17): error TS1471: Module '../index.js' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
tests/cases/conformance/node/subfolder/index.ts(3,22): error TS1471: Module '../index.js' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
tests/cases/conformance/node/index.ts(3,22): error TS1471: Module './index.js' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported with 'require'. Use an ECMAScript import instead.
|
||||
tests/cases/conformance/node/subfolder/index.ts(2,17): 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("../index.js")' call instead.
|
||||
To convert this file to an ECMAScript module, change its file extension to '.mts' or create a local package.json file with `{ "type": "module" }`.
|
||||
tests/cases/conformance/node/subfolder/index.ts(3,22): error TS1471: Module '../index.js' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported with 'require'. Use an ECMAScript import instead.
|
||||
|
||||
|
||||
==== tests/cases/conformance/node/subfolder/index.ts (2 errors) ====
|
||||
// cjs format file
|
||||
import {h} from "../index.js";
|
||||
~~~~~~~~~~~~~
|
||||
!!! error TS1471: Module '../index.js' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
!!! 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("../index.js")' call instead.
|
||||
!!! error TS1479: To convert this file to an ECMAScript module, change its file extension to '.mts' or create a local package.json file with `{ "type": "module" }`.
|
||||
import mod = require("../index.js");
|
||||
~~~~~~~~~~~~~
|
||||
!!! error TS1471: Module '../index.js' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
!!! error TS1471: Module '../index.js' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported with 'require'. Use an ECMAScript import instead.
|
||||
import {f as _f} from "./index.js";
|
||||
import mod2 = require("./index.js");
|
||||
export async function f() {
|
||||
@@ -23,7 +25,7 @@ tests/cases/conformance/node/subfolder/index.ts(3,22): error TS1471: Module '../
|
||||
import {h as _h} from "./index.js";
|
||||
import mod = require("./index.js");
|
||||
~~~~~~~~~~~~
|
||||
!!! error TS1471: Module './index.js' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
!!! error TS1471: Module './index.js' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported with 'require'. Use an ECMAScript import instead.
|
||||
import {f} from "./subfolder/index.js";
|
||||
import mod2 = require("./subfolder/index.js");
|
||||
export async function h() {
|
||||
|
||||
+8
-6
@@ -1,16 +1,18 @@
|
||||
tests/cases/conformance/node/index.ts(3,22): error TS1471: Module './index.js' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
tests/cases/conformance/node/subfolder/index.ts(2,17): error TS1471: Module '../index.js' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
tests/cases/conformance/node/subfolder/index.ts(3,22): error TS1471: Module '../index.js' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
tests/cases/conformance/node/index.ts(3,22): error TS1471: Module './index.js' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported with 'require'. Use an ECMAScript import instead.
|
||||
tests/cases/conformance/node/subfolder/index.ts(2,17): 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("../index.js")' call instead.
|
||||
To convert this file to an ECMAScript module, change its file extension to '.mts' or create a local package.json file with `{ "type": "module" }`.
|
||||
tests/cases/conformance/node/subfolder/index.ts(3,22): error TS1471: Module '../index.js' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported with 'require'. Use an ECMAScript import instead.
|
||||
|
||||
|
||||
==== tests/cases/conformance/node/subfolder/index.ts (2 errors) ====
|
||||
// cjs format file
|
||||
import {h} from "../index.js";
|
||||
~~~~~~~~~~~~~
|
||||
!!! error TS1471: Module '../index.js' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
!!! 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("../index.js")' call instead.
|
||||
!!! error TS1479: To convert this file to an ECMAScript module, change its file extension to '.mts' or create a local package.json file with `{ "type": "module" }`.
|
||||
import mod = require("../index.js");
|
||||
~~~~~~~~~~~~~
|
||||
!!! error TS1471: Module '../index.js' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
!!! error TS1471: Module '../index.js' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported with 'require'. Use an ECMAScript import instead.
|
||||
import {f as _f} from "./index.js";
|
||||
import mod2 = require("./index.js");
|
||||
export async function f() {
|
||||
@@ -23,7 +25,7 @@ tests/cases/conformance/node/subfolder/index.ts(3,22): error TS1471: Module '../
|
||||
import {h as _h} from "./index.js";
|
||||
import mod = require("./index.js");
|
||||
~~~~~~~~~~~~
|
||||
!!! error TS1471: Module './index.js' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
!!! error TS1471: Module './index.js' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported with 'require'. Use an ECMAScript import instead.
|
||||
import {f} from "./subfolder/index.js";
|
||||
import mod2 = require("./subfolder/index.js");
|
||||
export async function h() {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
tests/cases/conformance/node/index.cts(2,23): error TS1471: Module 'package' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
tests/cases/conformance/node/index.cts(2,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.
|
||||
|
||||
|
||||
==== tests/cases/conformance/node/index.ts (0 errors) ====
|
||||
@@ -13,7 +13,7 @@ tests/cases/conformance/node/index.cts(2,23): error TS1471: Module 'package' can
|
||||
// esm format file
|
||||
import * as self from "package";
|
||||
~~~~~~~~~
|
||||
!!! error TS1471: Module 'package' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
!!! 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.
|
||||
self;
|
||||
==== tests/cases/conformance/node/package.json (0 errors) ====
|
||||
{
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
tests/cases/conformance/node/index.cts(2,23): error TS1471: Module 'package' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
tests/cases/conformance/node/index.cts(2,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.
|
||||
|
||||
|
||||
==== tests/cases/conformance/node/index.ts (0 errors) ====
|
||||
@@ -13,7 +13,7 @@ tests/cases/conformance/node/index.cts(2,23): error TS1471: Module 'package' can
|
||||
// esm format file
|
||||
import * as self from "package";
|
||||
~~~~~~~~~
|
||||
!!! error TS1471: Module 'package' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
!!! 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.
|
||||
self;
|
||||
==== tests/cases/conformance/node/package.json (0 errors) ====
|
||||
{
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
tests/cases/conformance/node/index.cts(2,23): error TS1471: Module '@scope/package' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
tests/cases/conformance/node/index.cts(2,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("@scope/package")' call instead.
|
||||
|
||||
|
||||
==== tests/cases/conformance/node/index.ts (0 errors) ====
|
||||
@@ -13,7 +13,7 @@ tests/cases/conformance/node/index.cts(2,23): error TS1471: Module '@scope/packa
|
||||
// cjs format file
|
||||
import * as self from "@scope/package";
|
||||
~~~~~~~~~~~~~~~~
|
||||
!!! error TS1471: Module '@scope/package' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
!!! 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("@scope/package")' call instead.
|
||||
self;
|
||||
==== tests/cases/conformance/node/package.json (0 errors) ====
|
||||
{
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
tests/cases/conformance/node/index.cts(2,23): error TS1471: Module '@scope/package' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
tests/cases/conformance/node/index.cts(2,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("@scope/package")' call instead.
|
||||
|
||||
|
||||
==== tests/cases/conformance/node/index.ts (0 errors) ====
|
||||
@@ -13,7 +13,7 @@ tests/cases/conformance/node/index.cts(2,23): error TS1471: Module '@scope/packa
|
||||
// cjs format file
|
||||
import * as self from "@scope/package";
|
||||
~~~~~~~~~~~~~~~~
|
||||
!!! error TS1471: Module '@scope/package' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
!!! 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("@scope/package")' call instead.
|
||||
self;
|
||||
==== tests/cases/conformance/node/package.json (0 errors) ====
|
||||
{
|
||||
|
||||
+4
-2
@@ -315,7 +315,8 @@ File '/user/username/projects/myproject/packages/pkg2/build/const.d.cts' exist -
|
||||
File '/a/lib/package.json' does not exist.
|
||||
File '/a/package.json' does not exist.
|
||||
File '/package.json' does not exist.
|
||||
[96mpackages/pkg1/index.ts[0m:[93m1[0m:[93m29[0m - [91merror[0m[90m TS1471: [0mModule 'pkg2' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
[96mpackages/pkg1/index.ts[0m:[93m1[0m:[93m29[0m - [91merror[0m[90m TS1479: [0mThe 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("pkg2")' call instead.
|
||||
To convert this file to an ECMAScript module, change its file extension to '.mts' or create a local package.json file with `{ "type": "module" }`.
|
||||
|
||||
[7m1[0m import type { TheNum } from 'pkg2'
|
||||
[7m [0m [91m ~~~~~~[0m
|
||||
@@ -537,7 +538,8 @@ File '/user/username/projects/myproject/packages/pkg2/build/const.d.cts' exist -
|
||||
File '/a/lib/package.json' does not exist.
|
||||
File '/a/package.json' does not exist.
|
||||
File '/package.json' does not exist.
|
||||
[96mpackages/pkg1/index.ts[0m:[93m1[0m:[93m29[0m - [91merror[0m[90m TS1471: [0mModule 'pkg2' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
|
||||
[96mpackages/pkg1/index.ts[0m:[93m1[0m:[93m29[0m - [91merror[0m[90m TS1479: [0mThe 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("pkg2")' call instead.
|
||||
To convert this file to an ECMAScript module, change its file extension to '.mts' or create a local package.json file with `{ "type": "module" }`.
|
||||
|
||||
[7m1[0m import type { TheNum } from 'pkg2'
|
||||
[7m [0m [91m ~~~~~~[0m
|
||||
|
||||
+4
-4
@@ -136,7 +136,7 @@ response:{"responseRequired":false}
|
||||
event:
|
||||
{"seq":0,"type":"event","event":"syntaxDiag","body":{"file":"/user/username/projects/myproject/src/fileA.ts","diagnostics":[]}}
|
||||
event:
|
||||
{"seq":0,"type":"event","event":"semanticDiag","body":{"file":"/user/username/projects/myproject/src/fileA.ts","diagnostics":[{"start":{"line":1,"offset":21},"end":{"line":1,"offset":34},"text":"Module './fileB.mjs' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.","code":1471,"category":"error"}]}}
|
||||
{"seq":0,"type":"event","event":"semanticDiag","body":{"file":"/user/username/projects/myproject/src/fileA.ts","diagnostics":[{"start":{"line":1,"offset":21},"end":{"line":1,"offset":34},"text":"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(\"./fileB.mjs\")' call instead.\n To convert this file to an ECMAScript module, change its file extension to '.mts', or add the field `\"type\": \"module\"` to '/user/username/projects/myproject/package.json'.","code":1479,"category":"error"}]}}
|
||||
event:
|
||||
{"seq":0,"type":"event","event":"suggestionDiag","body":{"file":"/user/username/projects/myproject/src/fileA.ts","diagnostics":[]}}
|
||||
event:
|
||||
@@ -261,7 +261,7 @@ response:{"responseRequired":false}
|
||||
event:
|
||||
{"seq":0,"type":"event","event":"syntaxDiag","body":{"file":"/user/username/projects/myproject/src/fileA.ts","diagnostics":[]}}
|
||||
event:
|
||||
{"seq":0,"type":"event","event":"semanticDiag","body":{"file":"/user/username/projects/myproject/src/fileA.ts","diagnostics":[{"start":{"line":1,"offset":21},"end":{"line":1,"offset":34},"text":"Module './fileB.mjs' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.","code":1471,"category":"error"}]}}
|
||||
{"seq":0,"type":"event","event":"semanticDiag","body":{"file":"/user/username/projects/myproject/src/fileA.ts","diagnostics":[{"start":{"line":1,"offset":21},"end":{"line":1,"offset":34},"text":"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(\"./fileB.mjs\")' call instead.\n To convert this file to an ECMAScript module, change its file extension to '.mts' or create a local package.json file with `{ \"type\": \"module\" }`.","code":1479,"category":"error"}]}}
|
||||
event:
|
||||
{"seq":0,"type":"event","event":"suggestionDiag","body":{"file":"/user/username/projects/myproject/src/fileA.ts","diagnostics":[]}}
|
||||
event:
|
||||
@@ -325,7 +325,7 @@ response:{"responseRequired":false}
|
||||
event:
|
||||
{"seq":0,"type":"event","event":"syntaxDiag","body":{"file":"/user/username/projects/myproject/src/fileA.ts","diagnostics":[]}}
|
||||
event:
|
||||
{"seq":0,"type":"event","event":"semanticDiag","body":{"file":"/user/username/projects/myproject/src/fileA.ts","diagnostics":[{"start":{"line":1,"offset":21},"end":{"line":1,"offset":34},"text":"Module './fileB.mjs' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.","code":1471,"category":"error"}]}}
|
||||
{"seq":0,"type":"event","event":"semanticDiag","body":{"file":"/user/username/projects/myproject/src/fileA.ts","diagnostics":[{"start":{"line":1,"offset":21},"end":{"line":1,"offset":34},"text":"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(\"./fileB.mjs\")' call instead.\n To convert this file to an ECMAScript module, change its file extension to '.mts', or add the field `\"type\": \"module\"` to '/user/username/projects/myproject/package.json'.","code":1479,"category":"error"}]}}
|
||||
event:
|
||||
{"seq":0,"type":"event","event":"suggestionDiag","body":{"file":"/user/username/projects/myproject/src/fileA.ts","diagnostics":[]}}
|
||||
event:
|
||||
@@ -386,7 +386,7 @@ response:{"responseRequired":false}
|
||||
event:
|
||||
{"seq":0,"type":"event","event":"syntaxDiag","body":{"file":"/user/username/projects/myproject/src/fileA.ts","diagnostics":[]}}
|
||||
event:
|
||||
{"seq":0,"type":"event","event":"semanticDiag","body":{"file":"/user/username/projects/myproject/src/fileA.ts","diagnostics":[{"start":{"line":1,"offset":21},"end":{"line":1,"offset":34},"text":"Module './fileB.mjs' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.","code":1471,"category":"error"}]}}
|
||||
{"seq":0,"type":"event","event":"semanticDiag","body":{"file":"/user/username/projects/myproject/src/fileA.ts","diagnostics":[{"start":{"line":1,"offset":21},"end":{"line":1,"offset":34},"text":"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(\"./fileB.mjs\")' call instead.\n To convert this file to an ECMAScript module, change its file extension to '.mts' or create a local package.json file with `{ \"type\": \"module\" }`.","code":1479,"category":"error"}]}}
|
||||
event:
|
||||
{"seq":0,"type":"event","event":"suggestionDiag","body":{"file":"/user/username/projects/myproject/src/fileA.ts","diagnostics":[]}}
|
||||
event:
|
||||
|
||||
@@ -203,7 +203,7 @@ response:{"responseRequired":false}
|
||||
event:
|
||||
{"seq":0,"type":"event","event":"syntaxDiag","body":{"file":"/user/username/projects/myproject/src/fileA.ts","diagnostics":[]}}
|
||||
event:
|
||||
{"seq":0,"type":"event","event":"semanticDiag","body":{"file":"/user/username/projects/myproject/src/fileA.ts","diagnostics":[{"start":{"line":1,"offset":21},"end":{"line":1,"offset":34},"text":"Module './fileB.mjs' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.","code":1471,"category":"error"}]}}
|
||||
{"seq":0,"type":"event","event":"semanticDiag","body":{"file":"/user/username/projects/myproject/src/fileA.ts","diagnostics":[{"start":{"line":1,"offset":21},"end":{"line":1,"offset":34},"text":"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(\"./fileB.mjs\")' call instead.\n To convert this file to an ECMAScript module, change its file extension to '.mts', or add the field `\"type\": \"module\"` to '/user/username/projects/myproject/package.json'.","code":1479,"category":"error"}]}}
|
||||
event:
|
||||
{"seq":0,"type":"event","event":"suggestionDiag","body":{"file":"/user/username/projects/myproject/src/fileA.ts","diagnostics":[]}}
|
||||
event:
|
||||
@@ -267,7 +267,7 @@ response:{"responseRequired":false}
|
||||
event:
|
||||
{"seq":0,"type":"event","event":"syntaxDiag","body":{"file":"/user/username/projects/myproject/src/fileA.ts","diagnostics":[]}}
|
||||
event:
|
||||
{"seq":0,"type":"event","event":"semanticDiag","body":{"file":"/user/username/projects/myproject/src/fileA.ts","diagnostics":[{"start":{"line":1,"offset":21},"end":{"line":1,"offset":34},"text":"Module './fileB.mjs' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.","code":1471,"category":"error"}]}}
|
||||
{"seq":0,"type":"event","event":"semanticDiag","body":{"file":"/user/username/projects/myproject/src/fileA.ts","diagnostics":[{"start":{"line":1,"offset":21},"end":{"line":1,"offset":34},"text":"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(\"./fileB.mjs\")' call instead.\n To convert this file to an ECMAScript module, change its file extension to '.mts' or create a local package.json file with `{ \"type\": \"module\" }`.","code":1479,"category":"error"}]}}
|
||||
event:
|
||||
{"seq":0,"type":"event","event":"suggestionDiag","body":{"file":"/user/username/projects/myproject/src/fileA.ts","diagnostics":[]}}
|
||||
event:
|
||||
@@ -380,7 +380,7 @@ response:{"responseRequired":false}
|
||||
event:
|
||||
{"seq":0,"type":"event","event":"syntaxDiag","body":{"file":"/user/username/projects/myproject/src/fileA.ts","diagnostics":[]}}
|
||||
event:
|
||||
{"seq":0,"type":"event","event":"semanticDiag","body":{"file":"/user/username/projects/myproject/src/fileA.ts","diagnostics":[{"start":{"line":1,"offset":21},"end":{"line":1,"offset":34},"text":"Module './fileB.mjs' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.","code":1471,"category":"error"}]}}
|
||||
{"seq":0,"type":"event","event":"semanticDiag","body":{"file":"/user/username/projects/myproject/src/fileA.ts","diagnostics":[{"start":{"line":1,"offset":21},"end":{"line":1,"offset":34},"text":"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(\"./fileB.mjs\")' call instead.\n To convert this file to an ECMAScript module, change its file extension to '.mts' or create a local package.json file with `{ \"type\": \"module\" }`.","code":1479,"category":"error"}]}}
|
||||
event:
|
||||
{"seq":0,"type":"event","event":"suggestionDiag","body":{"file":"/user/username/projects/myproject/src/fileA.ts","diagnostics":[]}}
|
||||
event:
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
// @noEmit: true
|
||||
// @noTypesAndSymbols: true
|
||||
// @module: node16
|
||||
// @allowJs: true
|
||||
// @checkJs: true
|
||||
// @jsx: preserve
|
||||
|
||||
// @Filename: /package.json
|
||||
{}
|
||||
|
||||
// @Filename: /module.mts
|
||||
export {};
|
||||
|
||||
// @Filename: /tsExtension.ts
|
||||
import {} from "./module.mjs";
|
||||
|
||||
// @Filename: /jsExtension.js
|
||||
import {} from "./module.mjs";
|
||||
|
||||
// @Filename: /ctsExtension.cts
|
||||
import {} from "./module.mjs";
|
||||
|
||||
// @Filename: /tsxExtension.tsx
|
||||
import {} from "./module.mjs";
|
||||
@@ -0,0 +1,24 @@
|
||||
// @noEmit: true
|
||||
// @noTypesAndSymbols: true
|
||||
// @module: node16
|
||||
// @allowJs: true
|
||||
// @checkJs: true
|
||||
// @jsx: preserve
|
||||
|
||||
// @Filename: /package.json
|
||||
{ "type": "commonjs" }
|
||||
|
||||
// @Filename: /module.mts
|
||||
export {};
|
||||
|
||||
// @Filename: /tsExtension.ts
|
||||
import {} from "./module.mjs";
|
||||
|
||||
// @Filename: /jsExtension.js
|
||||
import {} from "./module.mjs";
|
||||
|
||||
// @Filename: /ctsExtension.cts
|
||||
import {} from "./module.mjs";
|
||||
|
||||
// @Filename: /tsxExtension.tsx
|
||||
import {} from "./module.mjs";
|
||||
@@ -0,0 +1,24 @@
|
||||
// @noEmit: true
|
||||
// @noTypesAndSymbols: true
|
||||
// @module: node16
|
||||
// @allowJs: true
|
||||
// @checkJs: true
|
||||
// @jsx: preserve
|
||||
|
||||
// @Filename: /package.json
|
||||
{ "type": "module" }
|
||||
|
||||
// @Filename: /module.mts
|
||||
export {};
|
||||
|
||||
// @Filename: /tsExtension.ts
|
||||
import {} from "./module.mjs";
|
||||
|
||||
// @Filename: /jsExtension.js
|
||||
import {} from "./module.mjs";
|
||||
|
||||
// @Filename: /ctsExtension.cts
|
||||
import {} from "./module.mjs";
|
||||
|
||||
// @Filename: /tsxExtension.tsx
|
||||
import {} from "./module.mjs";
|
||||
@@ -0,0 +1,21 @@
|
||||
// @noEmit: true
|
||||
// @noTypesAndSymbols: true
|
||||
// @module: node16
|
||||
// @allowJs: true
|
||||
// @checkJs: true
|
||||
// @jsx: preserve
|
||||
|
||||
// @Filename: /module.mts
|
||||
export {};
|
||||
|
||||
// @Filename: /tsExtension.ts
|
||||
import {} from "./module.mjs";
|
||||
|
||||
// @Filename: /jsExtension.js
|
||||
import {} from "./module.mjs";
|
||||
|
||||
// @Filename: /ctsExtension.cts
|
||||
import {} from "./module.mjs";
|
||||
|
||||
// @Filename: /tsxExtension.tsx
|
||||
import {} from "./module.mjs";
|
||||
Reference in new issue
Block a user