From bffe3540fa9ba2d0426298df35a91bd5983c7ad8 Mon Sep 17 00:00:00 2001 From: mshivaku99 <54600104+mshivaku99@users.noreply.github.com> Date: Thu, 30 Jul 2020 13:45:29 -0400 Subject: [PATCH] Issue35876: Give better error message when Classic Module Resolution with incorrect path (#38105) * added Error 5084 to diagnosticMessages.json * added test case errorForBareSpecifierWithImplicitModuleResolution1 to tests/cases/compiler * modified checker.ts to report error 5084 when classic resolution and incorrect path are used * added baseline changes * passes all test cases including src/testRunner/unittests/ tests * Update with feedback * Make it check whether it is the right module resolution kind * Use the right diagnostic message in tsserver tests Co-authored-by: Meera Shivakumar Co-authored-by: Orta --- src/compiler/checker.ts | 9 ++++--- src/compiler/diagnosticMessages.json | 5 ++++ src/testRunner/unittests/tscWatch/helpers.ts | 2 +- .../tsserver/cachingFileSystemInformation.ts | 4 ++-- .../aliasesInSystemModule1.errors.txt | 4 ++-- .../aliasesInSystemModule2.errors.txt | 4 ++-- ...alModuleInAnotherExternalModule.errors.txt | 4 ++-- .../amdDependencyComment2.errors.txt | 4 ++-- .../amdDependencyCommentName2.errors.txt | 4 ++-- .../amdDependencyCommentName3.errors.txt | 4 ++-- .../amdDependencyCommentName4.errors.txt | 16 ++++++------- ...syncAwaitIsolatedModules_es2017.errors.txt | 4 ++-- .../asyncAwaitIsolatedModules_es6.errors.txt | 4 ++-- .../badExternalModuleReference.errors.txt | 4 ++-- .../cachedModuleResolution8.errors.txt | 8 +++---- .../cachedModuleResolution9.errors.txt | 8 +++---- .../commentOnImportStatement1.errors.txt | 4 ++-- .../copyrightWithNewLine1.errors.txt | 4 ++-- .../copyrightWithoutNewLine1.errors.txt | 4 ++-- .../deduplicateImportsInSystem.errors.txt | 24 +++++++++---------- ...ithImplicitModuleResolutionNone.errors.txt | 11 +++++++++ ...ecifierWithImplicitModuleResolutionNone.js | 11 +++++++++ ...erWithImplicitModuleResolutionNone.symbols | 9 +++++++ ...fierWithImplicitModuleResolutionNone.types | 10 ++++++++ .../es5ModuleInternalNamedImports.errors.txt | 4 ++-- ...rtNamedImportIdentifiersParsing.errors.txt | 20 ++++++++-------- .../es6modulekindWithES5Target10.errors.txt | 4 ++-- .../es6modulekindWithES5Target9.errors.txt | 20 ++++++++-------- ...esnextmodulekindWithES5Target10.errors.txt | 4 ++-- .../esnextmodulekindWithES5Target9.errors.txt | 20 ++++++++-------- .../exportAsNamespace_nonExistent.errors.txt | 4 ++-- .../amd/cantFindTheModule.errors.txt | 12 +++++----- .../node/cantFindTheModule.errors.txt | 12 +++++----- ...MetadataCommonJSISolatedModules.errors.txt | 4 ++-- ...MetadataCommonJSISolatedModules.errors.txt | 4 ++-- ...ommonJSISolatedModulesNoResolve.errors.txt | 4 ++-- ...ommonJSISolatedModulesNoResolve.errors.txt | 4 ++-- .../emitDecoratorMetadataSystemJS.errors.txt | 4 ++-- .../emitDecoratorMetadataSystemJS.errors.txt | 4 ++-- ...MetadataSystemJSISolatedModules.errors.txt | 4 ++-- ...MetadataSystemJSISolatedModules.errors.txt | 4 ++-- ...ystemJSISolatedModulesNoResolve.errors.txt | 4 ++-- ...ystemJSISolatedModulesNoResolve.errors.txt | 4 ++-- .../amd/intReferencingExtAndInt.errors.txt | 4 ++-- .../node/intReferencingExtAndInt.errors.txt | 4 ++-- ...calModuleWithRecursiveTypecheck.errors.txt | 4 ++-- ...calModuleWithRecursiveTypecheck.errors.txt | 4 ++-- ...dModuleDeclarationsInsideModule.errors.txt | 8 +++---- ...dModuleDeclarationsInsideModule.errors.txt | 8 +++---- ...arationsInsideNonExportedModule.errors.txt | 8 +++---- ...arationsInsideNonExportedModule.errors.txt | 8 +++---- ...leImportStatementInParentModule.errors.txt | 8 +++---- ...leImportStatementInParentModule.errors.txt | 8 +++---- ...elativeNamesInClassicResolution.errors.txt | 4 ++-- .../requireOfJsonFileWithAmd.errors.txt | 8 +++---- ...ireOfJsonFileWithModuleEmitNone.errors.txt | 4 ++-- .../shorthand-property-es5-es6.errors.txt | 4 ++-- .../shorthand-property-es6-amd.errors.txt | 4 ++-- .../shorthand-property-es6-es6.errors.txt | 4 ++-- ...rictModeWordInImportDeclaration.errors.txt | 12 +++++----- .../reference/systemModule10.errors.txt | 8 +++---- .../reference/systemModule10_ES5.errors.txt | 8 +++---- .../reference/systemModule11.errors.txt | 24 +++++++++---------- .../reference/systemModule12.errors.txt | 4 ++-- .../reference/systemModule14.errors.txt | 4 ++-- .../reference/systemModule16.errors.txt | 24 +++++++++---------- .../reference/systemModule9.errors.txt | 24 +++++++++---------- .../umdDependencyComment2.errors.txt | 4 ++-- .../umdDependencyCommentName1.errors.txt | 4 ++-- .../umdDependencyCommentName2.errors.txt | 4 ++-- .../undeclaredModuleError.errors.txt | 4 ++-- ...ecifierWithImplicitModuleResolutionNone.ts | 5 ++++ 72 files changed, 290 insertions(+), 236 deletions(-) create mode 100644 tests/baselines/reference/errorForBareSpecifierWithImplicitModuleResolutionNone.errors.txt create mode 100644 tests/baselines/reference/errorForBareSpecifierWithImplicitModuleResolutionNone.js create mode 100644 tests/baselines/reference/errorForBareSpecifierWithImplicitModuleResolutionNone.symbols create mode 100644 tests/baselines/reference/errorForBareSpecifierWithImplicitModuleResolutionNone.types create mode 100644 tests/cases/compiler/errorForBareSpecifierWithImplicitModuleResolutionNone.ts diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index f05e5b1433f..b4f67eb27b8 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -2605,7 +2605,7 @@ namespace ts { } function getExternalModuleMember(node: ImportDeclaration | ExportDeclaration, specifier: ImportOrExportSpecifier, dontResolveAlias = false): Symbol | undefined { - const moduleSymbol = resolveExternalModuleName(node, node.moduleSpecifier!)!; // TODO: GH#18217 + const moduleSymbol = resolveExternalModuleName(node, node.moduleSpecifier!)!; const name = specifier.propertyName || specifier.name; const suppressInteropError = name.escapedText === InternalSymbolName.Default && !!(compilerOptions.allowSyntheticDefaultImports || compilerOptions.esModuleInterop); const targetSymbol = resolveESModuleSymbol(moduleSymbol, node.moduleSpecifier!, dontResolveAlias, suppressInteropError); @@ -3112,9 +3112,12 @@ namespace ts { } } - function resolveExternalModuleName(location: Node, moduleReferenceExpression: Expression, ignoreErrors?: boolean): Symbol | undefined { - return resolveExternalModuleNameWorker(location, moduleReferenceExpression, ignoreErrors ? undefined : Diagnostics.Cannot_find_module_0_or_its_corresponding_type_declarations); + const isClassic = getEmitModuleResolutionKind(compilerOptions) === ModuleResolutionKind.Classic; + const errorMessage = isClassic? + Diagnostics.Cannot_find_module_0_Did_you_mean_to_set_the_moduleResolution_option_to_node_or_to_add_aliases_to_the_paths_option + : Diagnostics.Cannot_find_module_0_or_its_corresponding_type_declarations; + return resolveExternalModuleNameWorker(location, moduleReferenceExpression, ignoreErrors ? undefined : errorMessage); } function resolveExternalModuleNameWorker(location: Node, moduleReferenceExpression: Expression, moduleNotFoundError: DiagnosticMessage | undefined, isForAugmentation = false): Symbol | undefined { diff --git a/src/compiler/diagnosticMessages.json b/src/compiler/diagnosticMessages.json index ea3dc6023ec..82f3cb4ce57 100644 --- a/src/compiler/diagnosticMessages.json +++ b/src/compiler/diagnosticMessages.json @@ -3012,6 +3012,11 @@ "category": "Error", "code": 2791 }, + "Cannot find module '{0}'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option?": { + "category": "Error", + "code": 2792 + }, + "Import declaration '{0}' is using private name '{1}'.": { "category": "Error", diff --git a/src/testRunner/unittests/tscWatch/helpers.ts b/src/testRunner/unittests/tscWatch/helpers.ts index 400958e5527..ad0ea2a95e9 100644 --- a/src/testRunner/unittests/tscWatch/helpers.ts +++ b/src/testRunner/unittests/tscWatch/helpers.ts @@ -267,7 +267,7 @@ namespace ts.tscWatch { export function getDiagnosticModuleNotFoundOfFile(program: Program, file: File, moduleName: string) { const quotedModuleName = `"${moduleName}"`; - return getDiagnosticOfFileFromProgram(program, file.path, file.content.indexOf(quotedModuleName), quotedModuleName.length, Diagnostics.Cannot_find_module_0_or_its_corresponding_type_declarations, moduleName); + return getDiagnosticOfFileFromProgram(program, file.path, file.content.indexOf(quotedModuleName), quotedModuleName.length, Diagnostics.Cannot_find_module_0_Did_you_mean_to_set_the_moduleResolution_option_to_node_or_to_add_aliases_to_the_paths_option, moduleName); } export function runQueuedTimeoutCallbacks(sys: WatchedSystem) { diff --git a/src/testRunner/unittests/tsserver/cachingFileSystemInformation.ts b/src/testRunner/unittests/tsserver/cachingFileSystemInformation.ts index e554ee4219c..c3fcfb5192c 100644 --- a/src/testRunner/unittests/tsserver/cachingFileSystemInformation.ts +++ b/src/testRunner/unittests/tsserver/cachingFileSystemInformation.ts @@ -240,8 +240,8 @@ namespace ts.projectSystem { let diags = project.getLanguageService().getSemanticDiagnostics(root.path); assert.equal(diags.length, 1); const diag = diags[0]; - assert.equal(diag.code, Diagnostics.Cannot_find_module_0_or_its_corresponding_type_declarations.code); - assert.equal(flattenDiagnosticMessageText(diag.messageText, "\n"), "Cannot find module 'bar' or its corresponding type declarations."); + assert.equal(diag.code, Diagnostics.Cannot_find_module_0_Did_you_mean_to_set_the_moduleResolution_option_to_node_or_to_add_aliases_to_the_paths_option.code); + assert.equal(flattenDiagnosticMessageText(diag.messageText, "\n"), "Cannot find module 'bar'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option?"); callsTrackingHost.verifyCalledOn(CalledMapsWithSingleArg.fileExists, imported.path); diff --git a/tests/baselines/reference/aliasesInSystemModule1.errors.txt b/tests/baselines/reference/aliasesInSystemModule1.errors.txt index 0d04ec6203d..5b3be2a6056 100644 --- a/tests/baselines/reference/aliasesInSystemModule1.errors.txt +++ b/tests/baselines/reference/aliasesInSystemModule1.errors.txt @@ -1,10 +1,10 @@ -tests/cases/compiler/aliasesInSystemModule1.ts(1,24): error TS2307: Cannot find module 'foo' or its corresponding type declarations. +tests/cases/compiler/aliasesInSystemModule1.ts(1,24): error TS2792: Cannot find module 'foo'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? ==== tests/cases/compiler/aliasesInSystemModule1.ts (1 errors) ==== import alias = require('foo'); ~~~~~ -!!! error TS2307: Cannot find module 'foo' or its corresponding type declarations. +!!! error TS2792: Cannot find module 'foo'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? import cls = alias.Class; export import cls2 = alias.Class; diff --git a/tests/baselines/reference/aliasesInSystemModule2.errors.txt b/tests/baselines/reference/aliasesInSystemModule2.errors.txt index d1ba8a1df83..f4c7842ad11 100644 --- a/tests/baselines/reference/aliasesInSystemModule2.errors.txt +++ b/tests/baselines/reference/aliasesInSystemModule2.errors.txt @@ -1,10 +1,10 @@ -tests/cases/compiler/aliasesInSystemModule2.ts(1,21): error TS2307: Cannot find module 'foo' or its corresponding type declarations. +tests/cases/compiler/aliasesInSystemModule2.ts(1,21): error TS2792: Cannot find module 'foo'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? ==== tests/cases/compiler/aliasesInSystemModule2.ts (1 errors) ==== import {alias} from "foo"; ~~~~~ -!!! error TS2307: Cannot find module 'foo' or its corresponding type declarations. +!!! error TS2792: Cannot find module 'foo'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? import cls = alias.Class; export import cls2 = alias.Class; diff --git a/tests/baselines/reference/ambientExternalModuleInAnotherExternalModule.errors.txt b/tests/baselines/reference/ambientExternalModuleInAnotherExternalModule.errors.txt index bd0137ffa34..d1436b4af0f 100644 --- a/tests/baselines/reference/ambientExternalModuleInAnotherExternalModule.errors.txt +++ b/tests/baselines/reference/ambientExternalModuleInAnotherExternalModule.errors.txt @@ -1,5 +1,5 @@ tests/cases/compiler/ambientExternalModuleInAnotherExternalModule.ts(4,16): error TS2664: Invalid module name in augmentation, module 'ext' cannot be found. -tests/cases/compiler/ambientExternalModuleInAnotherExternalModule.ts(9,22): error TS2307: Cannot find module 'ext' or its corresponding type declarations. +tests/cases/compiler/ambientExternalModuleInAnotherExternalModule.ts(9,22): error TS2792: Cannot find module 'ext'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? ==== tests/cases/compiler/ambientExternalModuleInAnotherExternalModule.ts (2 errors) ==== @@ -15,5 +15,5 @@ tests/cases/compiler/ambientExternalModuleInAnotherExternalModule.ts(9,22): erro // Cannot resolve this ext module reference import ext = require("ext"); ~~~~~ -!!! error TS2307: Cannot find module 'ext' or its corresponding type declarations. +!!! error TS2792: Cannot find module 'ext'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? var x = ext; \ No newline at end of file diff --git a/tests/baselines/reference/amdDependencyComment2.errors.txt b/tests/baselines/reference/amdDependencyComment2.errors.txt index 5f194cc081d..2d8d8b125ca 100644 --- a/tests/baselines/reference/amdDependencyComment2.errors.txt +++ b/tests/baselines/reference/amdDependencyComment2.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/amdDependencyComment2.ts(3,21): error TS2307: Cannot find module 'm2' or its corresponding type declarations. +tests/cases/compiler/amdDependencyComment2.ts(3,21): error TS2792: Cannot find module 'm2'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? ==== tests/cases/compiler/amdDependencyComment2.ts (1 errors) ==== @@ -6,5 +6,5 @@ tests/cases/compiler/amdDependencyComment2.ts(3,21): error TS2307: Cannot find m import m1 = require("m2") ~~~~ -!!! error TS2307: Cannot find module 'm2' or its corresponding type declarations. +!!! error TS2792: Cannot find module 'm2'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? m1.f(); \ No newline at end of file diff --git a/tests/baselines/reference/amdDependencyCommentName2.errors.txt b/tests/baselines/reference/amdDependencyCommentName2.errors.txt index 935e839abbb..af8fbee9a1d 100644 --- a/tests/baselines/reference/amdDependencyCommentName2.errors.txt +++ b/tests/baselines/reference/amdDependencyCommentName2.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/amdDependencyCommentName2.ts(3,21): error TS2307: Cannot find module 'm2' or its corresponding type declarations. +tests/cases/compiler/amdDependencyCommentName2.ts(3,21): error TS2792: Cannot find module 'm2'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? ==== tests/cases/compiler/amdDependencyCommentName2.ts (1 errors) ==== @@ -6,5 +6,5 @@ tests/cases/compiler/amdDependencyCommentName2.ts(3,21): error TS2307: Cannot fi import m1 = require("m2") ~~~~ -!!! error TS2307: Cannot find module 'm2' or its corresponding type declarations. +!!! error TS2792: Cannot find module 'm2'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? m1.f(); \ No newline at end of file diff --git a/tests/baselines/reference/amdDependencyCommentName3.errors.txt b/tests/baselines/reference/amdDependencyCommentName3.errors.txt index 1da4d3c358a..612e41c21e6 100644 --- a/tests/baselines/reference/amdDependencyCommentName3.errors.txt +++ b/tests/baselines/reference/amdDependencyCommentName3.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/amdDependencyCommentName3.ts(5,21): error TS2307: Cannot find module 'm2' or its corresponding type declarations. +tests/cases/compiler/amdDependencyCommentName3.ts(5,21): error TS2792: Cannot find module 'm2'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? ==== tests/cases/compiler/amdDependencyCommentName3.ts (1 errors) ==== @@ -8,5 +8,5 @@ tests/cases/compiler/amdDependencyCommentName3.ts(5,21): error TS2307: Cannot fi import m1 = require("m2") ~~~~ -!!! error TS2307: Cannot find module 'm2' or its corresponding type declarations. +!!! error TS2792: Cannot find module 'm2'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? m1.f(); \ No newline at end of file diff --git a/tests/baselines/reference/amdDependencyCommentName4.errors.txt b/tests/baselines/reference/amdDependencyCommentName4.errors.txt index fb666eb7119..75e1cdfc985 100644 --- a/tests/baselines/reference/amdDependencyCommentName4.errors.txt +++ b/tests/baselines/reference/amdDependencyCommentName4.errors.txt @@ -1,7 +1,7 @@ -tests/cases/compiler/amdDependencyCommentName4.ts(8,21): error TS2307: Cannot find module 'aliasedModule1' or its corresponding type declarations. -tests/cases/compiler/amdDependencyCommentName4.ts(11,26): error TS2307: Cannot find module 'aliasedModule2' or its corresponding type declarations. -tests/cases/compiler/amdDependencyCommentName4.ts(14,15): error TS2307: Cannot find module 'aliasedModule3' or its corresponding type declarations. -tests/cases/compiler/amdDependencyCommentName4.ts(17,21): error TS2307: Cannot find module 'aliasedModule4' or its corresponding type declarations. +tests/cases/compiler/amdDependencyCommentName4.ts(8,21): error TS2792: Cannot find module 'aliasedModule1'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? +tests/cases/compiler/amdDependencyCommentName4.ts(11,26): error TS2792: Cannot find module 'aliasedModule2'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? +tests/cases/compiler/amdDependencyCommentName4.ts(14,15): error TS2792: Cannot find module 'aliasedModule3'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? +tests/cases/compiler/amdDependencyCommentName4.ts(17,21): error TS2792: Cannot find module 'aliasedModule4'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? ==== tests/cases/compiler/amdDependencyCommentName4.ts (4 errors) ==== @@ -14,22 +14,22 @@ tests/cases/compiler/amdDependencyCommentName4.ts(17,21): error TS2307: Cannot f import r1 = require("aliasedModule1"); ~~~~~~~~~~~~~~~~ -!!! error TS2307: Cannot find module 'aliasedModule1' or its corresponding type declarations. +!!! error TS2792: Cannot find module 'aliasedModule1'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? r1; import {p1, p2, p3} from "aliasedModule2"; ~~~~~~~~~~~~~~~~ -!!! error TS2307: Cannot find module 'aliasedModule2' or its corresponding type declarations. +!!! error TS2792: Cannot find module 'aliasedModule2'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? p1; import d from "aliasedModule3"; ~~~~~~~~~~~~~~~~ -!!! error TS2307: Cannot find module 'aliasedModule3' or its corresponding type declarations. +!!! error TS2792: Cannot find module 'aliasedModule3'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? d; import * as ns from "aliasedModule4"; ~~~~~~~~~~~~~~~~ -!!! error TS2307: Cannot find module 'aliasedModule4' or its corresponding type declarations. +!!! error TS2792: Cannot find module 'aliasedModule4'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? ns; import "unaliasedModule2"; \ No newline at end of file diff --git a/tests/baselines/reference/asyncAwaitIsolatedModules_es2017.errors.txt b/tests/baselines/reference/asyncAwaitIsolatedModules_es2017.errors.txt index 25392e59232..62bb6c1d4d5 100644 --- a/tests/baselines/reference/asyncAwaitIsolatedModules_es2017.errors.txt +++ b/tests/baselines/reference/asyncAwaitIsolatedModules_es2017.errors.txt @@ -1,10 +1,10 @@ -tests/cases/conformance/async/es2017/asyncAwaitIsolatedModules_es2017.ts(1,27): error TS2307: Cannot find module 'missing' or its corresponding type declarations. +tests/cases/conformance/async/es2017/asyncAwaitIsolatedModules_es2017.ts(1,27): error TS2792: Cannot find module 'missing'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? ==== tests/cases/conformance/async/es2017/asyncAwaitIsolatedModules_es2017.ts (1 errors) ==== import { MyPromise } from "missing"; ~~~~~~~~~ -!!! error TS2307: Cannot find module 'missing' or its corresponding type declarations. +!!! error TS2792: Cannot find module 'missing'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? declare var p: Promise; declare var mp: MyPromise; diff --git a/tests/baselines/reference/asyncAwaitIsolatedModules_es6.errors.txt b/tests/baselines/reference/asyncAwaitIsolatedModules_es6.errors.txt index ddd91b09afb..1088f4978bd 100644 --- a/tests/baselines/reference/asyncAwaitIsolatedModules_es6.errors.txt +++ b/tests/baselines/reference/asyncAwaitIsolatedModules_es6.errors.txt @@ -1,10 +1,10 @@ -tests/cases/conformance/async/es6/asyncAwaitIsolatedModules_es6.ts(1,27): error TS2307: Cannot find module 'missing' or its corresponding type declarations. +tests/cases/conformance/async/es6/asyncAwaitIsolatedModules_es6.ts(1,27): error TS2792: Cannot find module 'missing'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? ==== tests/cases/conformance/async/es6/asyncAwaitIsolatedModules_es6.ts (1 errors) ==== import { MyPromise } from "missing"; ~~~~~~~~~ -!!! error TS2307: Cannot find module 'missing' or its corresponding type declarations. +!!! error TS2792: Cannot find module 'missing'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? declare var p: Promise; declare var mp: MyPromise; diff --git a/tests/baselines/reference/badExternalModuleReference.errors.txt b/tests/baselines/reference/badExternalModuleReference.errors.txt index 1133400b65a..b1871dd0d28 100644 --- a/tests/baselines/reference/badExternalModuleReference.errors.txt +++ b/tests/baselines/reference/badExternalModuleReference.errors.txt @@ -1,10 +1,10 @@ -tests/cases/compiler/badExternalModuleReference.ts(1,21): error TS2307: Cannot find module 'garbage' or its corresponding type declarations. +tests/cases/compiler/badExternalModuleReference.ts(1,21): error TS2792: Cannot find module 'garbage'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? ==== tests/cases/compiler/badExternalModuleReference.ts (1 errors) ==== import a1 = require("garbage"); ~~~~~~~~~ -!!! error TS2307: Cannot find module 'garbage' or its corresponding type declarations. +!!! error TS2792: Cannot find module 'garbage'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? export declare var a: { test1: a1.connectModule; (): a1.connectExport; diff --git a/tests/baselines/reference/cachedModuleResolution8.errors.txt b/tests/baselines/reference/cachedModuleResolution8.errors.txt index e80de6969f6..d7111d8b4b4 100644 --- a/tests/baselines/reference/cachedModuleResolution8.errors.txt +++ b/tests/baselines/reference/cachedModuleResolution8.errors.txt @@ -1,13 +1,13 @@ -/a/b/c/d/e/app.ts(1,17): error TS2307: Cannot find module 'foo' or its corresponding type declarations. -/a/b/c/lib.ts(1,17): error TS2307: Cannot find module 'foo' or its corresponding type declarations. +/a/b/c/d/e/app.ts(1,17): error TS2792: Cannot find module 'foo'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? +/a/b/c/lib.ts(1,17): error TS2792: Cannot find module 'foo'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? ==== /a/b/c/d/e/app.ts (1 errors) ==== import {x} from "foo"; ~~~~~ -!!! error TS2307: Cannot find module 'foo' or its corresponding type declarations. +!!! error TS2792: Cannot find module 'foo'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? ==== /a/b/c/lib.ts (1 errors) ==== import {x} from "foo"; ~~~~~ -!!! error TS2307: Cannot find module 'foo' or its corresponding type declarations. \ No newline at end of file +!!! error TS2792: Cannot find module 'foo'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? \ No newline at end of file diff --git a/tests/baselines/reference/cachedModuleResolution9.errors.txt b/tests/baselines/reference/cachedModuleResolution9.errors.txt index 0dc795af6b3..d212a55a914 100644 --- a/tests/baselines/reference/cachedModuleResolution9.errors.txt +++ b/tests/baselines/reference/cachedModuleResolution9.errors.txt @@ -1,15 +1,15 @@ -/a/b/c/d/e/app.ts(1,17): error TS2307: Cannot find module 'foo' or its corresponding type declarations. -/a/b/c/lib.ts(1,17): error TS2307: Cannot find module 'foo' or its corresponding type declarations. +/a/b/c/d/e/app.ts(1,17): error TS2792: Cannot find module 'foo'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? +/a/b/c/lib.ts(1,17): error TS2792: Cannot find module 'foo'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? ==== /a/b/c/lib.ts (1 errors) ==== import {x} from "foo"; ~~~~~ -!!! error TS2307: Cannot find module 'foo' or its corresponding type declarations. +!!! error TS2792: Cannot find module 'foo'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? ==== /a/b/c/d/e/app.ts (1 errors) ==== import {x} from "foo"; ~~~~~ -!!! error TS2307: Cannot find module 'foo' or its corresponding type declarations. +!!! error TS2792: Cannot find module 'foo'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? \ No newline at end of file diff --git a/tests/baselines/reference/commentOnImportStatement1.errors.txt b/tests/baselines/reference/commentOnImportStatement1.errors.txt index 5fb5009fa23..e6dd806ff6a 100644 --- a/tests/baselines/reference/commentOnImportStatement1.errors.txt +++ b/tests/baselines/reference/commentOnImportStatement1.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/commentOnImportStatement1.ts(3,22): error TS2307: Cannot find module './foo' or its corresponding type declarations. +tests/cases/compiler/commentOnImportStatement1.ts(3,22): error TS2792: Cannot find module './foo'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? ==== tests/cases/compiler/commentOnImportStatement1.ts (1 errors) ==== @@ -6,5 +6,5 @@ tests/cases/compiler/commentOnImportStatement1.ts(3,22): error TS2307: Cannot fi import foo = require('./foo'); ~~~~~~~ -!!! error TS2307: Cannot find module './foo' or its corresponding type declarations. +!!! error TS2792: Cannot find module './foo'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? \ No newline at end of file diff --git a/tests/baselines/reference/copyrightWithNewLine1.errors.txt b/tests/baselines/reference/copyrightWithNewLine1.errors.txt index 21c19c41741..ede8c3c9bdd 100644 --- a/tests/baselines/reference/copyrightWithNewLine1.errors.txt +++ b/tests/baselines/reference/copyrightWithNewLine1.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/copyrightWithNewLine1.ts(5,24): error TS2307: Cannot find module './greeter' or its corresponding type declarations. +tests/cases/compiler/copyrightWithNewLine1.ts(5,24): error TS2792: Cannot find module './greeter'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? ==== tests/cases/compiler/copyrightWithNewLine1.ts (1 errors) ==== @@ -8,7 +8,7 @@ tests/cases/compiler/copyrightWithNewLine1.ts(5,24): error TS2307: Cannot find m import model = require("./greeter") ~~~~~~~~~~~ -!!! error TS2307: Cannot find module './greeter' or its corresponding type declarations. +!!! error TS2792: Cannot find module './greeter'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? var el = document.getElementById('content'); var greeter = new model.Greeter(el); /** things */ diff --git a/tests/baselines/reference/copyrightWithoutNewLine1.errors.txt b/tests/baselines/reference/copyrightWithoutNewLine1.errors.txt index 51bc7422286..4777bf7dea3 100644 --- a/tests/baselines/reference/copyrightWithoutNewLine1.errors.txt +++ b/tests/baselines/reference/copyrightWithoutNewLine1.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/copyrightWithoutNewLine1.ts(4,24): error TS2307: Cannot find module './greeter' or its corresponding type declarations. +tests/cases/compiler/copyrightWithoutNewLine1.ts(4,24): error TS2792: Cannot find module './greeter'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? ==== tests/cases/compiler/copyrightWithoutNewLine1.ts (1 errors) ==== @@ -7,7 +7,7 @@ tests/cases/compiler/copyrightWithoutNewLine1.ts(4,24): error TS2307: Cannot fin ****************************/ import model = require("./greeter") ~~~~~~~~~~~ -!!! error TS2307: Cannot find module './greeter' or its corresponding type declarations. +!!! error TS2792: Cannot find module './greeter'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? var el = document.getElementById('content'); var greeter = new model.Greeter(el); /** things */ diff --git a/tests/baselines/reference/deduplicateImportsInSystem.errors.txt b/tests/baselines/reference/deduplicateImportsInSystem.errors.txt index e77bd5cfaa0..b16a119650c 100644 --- a/tests/baselines/reference/deduplicateImportsInSystem.errors.txt +++ b/tests/baselines/reference/deduplicateImportsInSystem.errors.txt @@ -1,29 +1,29 @@ -tests/cases/compiler/deduplicateImportsInSystem.ts(1,17): error TS2307: Cannot find module 'f1' or its corresponding type declarations. -tests/cases/compiler/deduplicateImportsInSystem.ts(2,17): error TS2307: Cannot find module 'f2' or its corresponding type declarations. -tests/cases/compiler/deduplicateImportsInSystem.ts(3,17): error TS2307: Cannot find module 'f3' or its corresponding type declarations. -tests/cases/compiler/deduplicateImportsInSystem.ts(4,17): error TS2307: Cannot find module 'f2' or its corresponding type declarations. -tests/cases/compiler/deduplicateImportsInSystem.ts(5,17): error TS2307: Cannot find module 'f2' or its corresponding type declarations. -tests/cases/compiler/deduplicateImportsInSystem.ts(6,17): error TS2307: Cannot find module 'f1' or its corresponding type declarations. +tests/cases/compiler/deduplicateImportsInSystem.ts(1,17): error TS2792: Cannot find module 'f1'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? +tests/cases/compiler/deduplicateImportsInSystem.ts(2,17): error TS2792: Cannot find module 'f2'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? +tests/cases/compiler/deduplicateImportsInSystem.ts(3,17): error TS2792: Cannot find module 'f3'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? +tests/cases/compiler/deduplicateImportsInSystem.ts(4,17): error TS2792: Cannot find module 'f2'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? +tests/cases/compiler/deduplicateImportsInSystem.ts(5,17): error TS2792: Cannot find module 'f2'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? +tests/cases/compiler/deduplicateImportsInSystem.ts(6,17): error TS2792: Cannot find module 'f1'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? ==== tests/cases/compiler/deduplicateImportsInSystem.ts (6 errors) ==== import {A} from "f1"; ~~~~ -!!! error TS2307: Cannot find module 'f1' or its corresponding type declarations. +!!! error TS2792: Cannot find module 'f1'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? import {B} from "f2"; ~~~~ -!!! error TS2307: Cannot find module 'f2' or its corresponding type declarations. +!!! error TS2792: Cannot find module 'f2'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? import {C} from "f3"; ~~~~ -!!! error TS2307: Cannot find module 'f3' or its corresponding type declarations. +!!! error TS2792: Cannot find module 'f3'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? import {D} from 'f2'; ~~~~ -!!! error TS2307: Cannot find module 'f2' or its corresponding type declarations. +!!! error TS2792: Cannot find module 'f2'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? import {E} from "f2"; ~~~~ -!!! error TS2307: Cannot find module 'f2' or its corresponding type declarations. +!!! error TS2792: Cannot find module 'f2'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? import {F} from 'f1'; ~~~~ -!!! error TS2307: Cannot find module 'f1' or its corresponding type declarations. +!!! error TS2792: Cannot find module 'f1'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? console.log(A + B + C + D + E + F) \ No newline at end of file diff --git a/tests/baselines/reference/errorForBareSpecifierWithImplicitModuleResolutionNone.errors.txt b/tests/baselines/reference/errorForBareSpecifierWithImplicitModuleResolutionNone.errors.txt new file mode 100644 index 00000000000..73b6e989782 --- /dev/null +++ b/tests/baselines/reference/errorForBareSpecifierWithImplicitModuleResolutionNone.errors.txt @@ -0,0 +1,11 @@ +tests/cases/compiler/errorForBareSpecifierWithImplicitModuleResolutionNone.ts(3,23): error TS2792: Cannot find module 'non-existent-module'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? + + +==== tests/cases/compiler/errorForBareSpecifierWithImplicitModuleResolutionNone.ts (1 errors) ==== + // This would be classed as moduleResolutionKind: Classic + + import { thing } from "non-existent-module"; + ~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2792: Cannot find module 'non-existent-module'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? + thing() + \ No newline at end of file diff --git a/tests/baselines/reference/errorForBareSpecifierWithImplicitModuleResolutionNone.js b/tests/baselines/reference/errorForBareSpecifierWithImplicitModuleResolutionNone.js new file mode 100644 index 00000000000..48a4a125b9b --- /dev/null +++ b/tests/baselines/reference/errorForBareSpecifierWithImplicitModuleResolutionNone.js @@ -0,0 +1,11 @@ +//// [errorForBareSpecifierWithImplicitModuleResolutionNone.ts] +// This would be classed as moduleResolutionKind: Classic + +import { thing } from "non-existent-module"; +thing() + + +//// [errorForBareSpecifierWithImplicitModuleResolutionNone.js] +// This would be classed as moduleResolutionKind: Classic +import { thing } from "non-existent-module"; +thing(); diff --git a/tests/baselines/reference/errorForBareSpecifierWithImplicitModuleResolutionNone.symbols b/tests/baselines/reference/errorForBareSpecifierWithImplicitModuleResolutionNone.symbols new file mode 100644 index 00000000000..79d69117aa1 --- /dev/null +++ b/tests/baselines/reference/errorForBareSpecifierWithImplicitModuleResolutionNone.symbols @@ -0,0 +1,9 @@ +=== tests/cases/compiler/errorForBareSpecifierWithImplicitModuleResolutionNone.ts === +// This would be classed as moduleResolutionKind: Classic + +import { thing } from "non-existent-module"; +>thing : Symbol(thing, Decl(errorForBareSpecifierWithImplicitModuleResolutionNone.ts, 2, 8)) + +thing() +>thing : Symbol(thing, Decl(errorForBareSpecifierWithImplicitModuleResolutionNone.ts, 2, 8)) + diff --git a/tests/baselines/reference/errorForBareSpecifierWithImplicitModuleResolutionNone.types b/tests/baselines/reference/errorForBareSpecifierWithImplicitModuleResolutionNone.types new file mode 100644 index 00000000000..ca24fb44d42 --- /dev/null +++ b/tests/baselines/reference/errorForBareSpecifierWithImplicitModuleResolutionNone.types @@ -0,0 +1,10 @@ +=== tests/cases/compiler/errorForBareSpecifierWithImplicitModuleResolutionNone.ts === +// This would be classed as moduleResolutionKind: Classic + +import { thing } from "non-existent-module"; +>thing : any + +thing() +>thing() : any +>thing : any + diff --git a/tests/baselines/reference/es5ModuleInternalNamedImports.errors.txt b/tests/baselines/reference/es5ModuleInternalNamedImports.errors.txt index 92124b17fae..8f8f6a875aa 100644 --- a/tests/baselines/reference/es5ModuleInternalNamedImports.errors.txt +++ b/tests/baselines/reference/es5ModuleInternalNamedImports.errors.txt @@ -9,7 +9,7 @@ tests/cases/compiler/es5ModuleInternalNamedImports.ts(29,5): error TS1194: Expor tests/cases/compiler/es5ModuleInternalNamedImports.ts(30,25): error TS1147: Import declarations in a namespace cannot reference a module. tests/cases/compiler/es5ModuleInternalNamedImports.ts(31,20): error TS1147: Import declarations in a namespace cannot reference a module. tests/cases/compiler/es5ModuleInternalNamedImports.ts(32,32): error TS1147: Import declarations in a namespace cannot reference a module. -tests/cases/compiler/es5ModuleInternalNamedImports.ts(34,16): error TS2307: Cannot find module 'M3' or its corresponding type declarations. +tests/cases/compiler/es5ModuleInternalNamedImports.ts(34,16): error TS2792: Cannot find module 'M3'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? ==== tests/cases/compiler/es5ModuleInternalNamedImports.ts (12 errors) ==== @@ -70,5 +70,5 @@ tests/cases/compiler/es5ModuleInternalNamedImports.ts(34,16): error TS2307: Cann } import M3 from "M3"; ~~~~ -!!! error TS2307: Cannot find module 'M3' or its corresponding type declarations. +!!! error TS2792: Cannot find module 'M3'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? \ No newline at end of file diff --git a/tests/baselines/reference/es6ImportNamedImportIdentifiersParsing.errors.txt b/tests/baselines/reference/es6ImportNamedImportIdentifiersParsing.errors.txt index 2ea94f08a10..728dc6732f1 100644 --- a/tests/baselines/reference/es6ImportNamedImportIdentifiersParsing.errors.txt +++ b/tests/baselines/reference/es6ImportNamedImportIdentifiersParsing.errors.txt @@ -1,16 +1,16 @@ tests/cases/compiler/es6ImportNamedImportIdentifiersParsing.ts(1,10): error TS2300: Duplicate identifier 'yield'. -tests/cases/compiler/es6ImportNamedImportIdentifiersParsing.ts(1,23): error TS2307: Cannot find module 'somemodule' or its corresponding type declarations. +tests/cases/compiler/es6ImportNamedImportIdentifiersParsing.ts(1,23): error TS2792: Cannot find module 'somemodule'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? tests/cases/compiler/es6ImportNamedImportIdentifiersParsing.ts(2,10): error TS1003: Identifier expected. tests/cases/compiler/es6ImportNamedImportIdentifiersParsing.ts(2,10): error TS2300: Duplicate identifier 'default'. -tests/cases/compiler/es6ImportNamedImportIdentifiersParsing.ts(2,25): error TS2307: Cannot find module 'somemodule' or its corresponding type declarations. +tests/cases/compiler/es6ImportNamedImportIdentifiersParsing.ts(2,25): error TS2792: Cannot find module 'somemodule'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? tests/cases/compiler/es6ImportNamedImportIdentifiersParsing.ts(3,19): error TS1003: Identifier expected. tests/cases/compiler/es6ImportNamedImportIdentifiersParsing.ts(3,19): error TS2300: Duplicate identifier 'default'. -tests/cases/compiler/es6ImportNamedImportIdentifiersParsing.ts(3,34): error TS2307: Cannot find module 'somemodule' or its corresponding type declarations. +tests/cases/compiler/es6ImportNamedImportIdentifiersParsing.ts(3,34): error TS2792: Cannot find module 'somemodule'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? tests/cases/compiler/es6ImportNamedImportIdentifiersParsing.ts(4,21): error TS2300: Duplicate identifier 'yield'. -tests/cases/compiler/es6ImportNamedImportIdentifiersParsing.ts(4,34): error TS2307: Cannot find module 'somemodule' or its corresponding type declarations. +tests/cases/compiler/es6ImportNamedImportIdentifiersParsing.ts(4,34): error TS2792: Cannot find module 'somemodule'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? tests/cases/compiler/es6ImportNamedImportIdentifiersParsing.ts(5,21): error TS1003: Identifier expected. tests/cases/compiler/es6ImportNamedImportIdentifiersParsing.ts(5,21): error TS2300: Duplicate identifier 'default'. -tests/cases/compiler/es6ImportNamedImportIdentifiersParsing.ts(5,36): error TS2307: Cannot find module 'somemodule' or its corresponding type declarations. +tests/cases/compiler/es6ImportNamedImportIdentifiersParsing.ts(5,36): error TS2792: Cannot find module 'somemodule'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? ==== tests/cases/compiler/es6ImportNamedImportIdentifiersParsing.ts (13 errors) ==== @@ -18,30 +18,30 @@ tests/cases/compiler/es6ImportNamedImportIdentifiersParsing.ts(5,36): error TS23 ~~~~~ !!! error TS2300: Duplicate identifier 'yield'. ~~~~~~~~~~~~ -!!! error TS2307: Cannot find module 'somemodule' or its corresponding type declarations. +!!! error TS2792: Cannot find module 'somemodule'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? import { default } from "somemodule"; // Error - as this is keyword that is not allowed as identifier ~~~~~~~ !!! error TS1003: Identifier expected. ~~~~~~~ !!! error TS2300: Duplicate identifier 'default'. ~~~~~~~~~~~~ -!!! error TS2307: Cannot find module 'somemodule' or its corresponding type declarations. +!!! error TS2792: Cannot find module 'somemodule'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? import { yield as default } from "somemodule"; // error to use default as binding name ~~~~~~~ !!! error TS1003: Identifier expected. ~~~~~~~ !!! error TS2300: Duplicate identifier 'default'. ~~~~~~~~~~~~ -!!! error TS2307: Cannot find module 'somemodule' or its corresponding type declarations. +!!! error TS2792: Cannot find module 'somemodule'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? import { default as yield } from "somemodule"; // no error ~~~~~ !!! error TS2300: Duplicate identifier 'yield'. ~~~~~~~~~~~~ -!!! error TS2307: Cannot find module 'somemodule' or its corresponding type declarations. +!!! error TS2792: Cannot find module 'somemodule'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? import { default as default } from "somemodule"; // default as is ok, error of default binding name ~~~~~~~ !!! error TS1003: Identifier expected. ~~~~~~~ !!! error TS2300: Duplicate identifier 'default'. ~~~~~~~~~~~~ -!!! error TS2307: Cannot find module 'somemodule' or its corresponding type declarations. \ No newline at end of file +!!! error TS2792: Cannot find module 'somemodule'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? \ No newline at end of file diff --git a/tests/baselines/reference/es6modulekindWithES5Target10.errors.txt b/tests/baselines/reference/es6modulekindWithES5Target10.errors.txt index fa234f98d86..106aa39ee2f 100644 --- a/tests/baselines/reference/es6modulekindWithES5Target10.errors.txt +++ b/tests/baselines/reference/es6modulekindWithES5Target10.errors.txt @@ -1,5 +1,5 @@ tests/cases/conformance/externalModules/es6/es6modulekindWithES5Target10.ts(1,1): error TS1202: Import assignment cannot be used when targeting ECMAScript modules. Consider using 'import * as ns from "mod"', 'import {a} from "mod"', 'import d from "mod"', or another module format instead. -tests/cases/conformance/externalModules/es6/es6modulekindWithES5Target10.ts(1,20): error TS2307: Cannot find module 'mod' or its corresponding type declarations. +tests/cases/conformance/externalModules/es6/es6modulekindWithES5Target10.ts(1,20): error TS2792: Cannot find module 'mod'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? tests/cases/conformance/externalModules/es6/es6modulekindWithES5Target10.ts(6,1): error TS1203: Export assignment cannot be used when targeting ECMAScript modules. Consider using 'export default' or another module format instead. @@ -8,7 +8,7 @@ tests/cases/conformance/externalModules/es6/es6modulekindWithES5Target10.ts(6,1) ~~~~~~~~~~~~~~~~~~~~~~~~~~ !!! error TS1202: Import assignment cannot be used when targeting ECMAScript modules. Consider using 'import * as ns from "mod"', 'import {a} from "mod"', 'import d from "mod"', or another module format instead. ~~~~~ -!!! error TS2307: Cannot find module 'mod' or its corresponding type declarations. +!!! error TS2792: Cannot find module 'mod'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? namespace N { diff --git a/tests/baselines/reference/es6modulekindWithES5Target9.errors.txt b/tests/baselines/reference/es6modulekindWithES5Target9.errors.txt index 7251d1d5203..245fb41943a 100644 --- a/tests/baselines/reference/es6modulekindWithES5Target9.errors.txt +++ b/tests/baselines/reference/es6modulekindWithES5Target9.errors.txt @@ -1,22 +1,22 @@ -tests/cases/conformance/externalModules/es6/es6modulekindWithES5Target9.ts(1,15): error TS2307: Cannot find module 'mod' or its corresponding type declarations. -tests/cases/conformance/externalModules/es6/es6modulekindWithES5Target9.ts(3,17): error TS2307: Cannot find module 'mod' or its corresponding type declarations. -tests/cases/conformance/externalModules/es6/es6modulekindWithES5Target9.ts(5,20): error TS2307: Cannot find module 'mod' or its corresponding type declarations. -tests/cases/conformance/externalModules/es6/es6modulekindWithES5Target9.ts(13,15): error TS2307: Cannot find module 'mod' or its corresponding type declarations. -tests/cases/conformance/externalModules/es6/es6modulekindWithES5Target9.ts(15,17): error TS2307: Cannot find module 'mod' or its corresponding type declarations. +tests/cases/conformance/externalModules/es6/es6modulekindWithES5Target9.ts(1,15): error TS2792: Cannot find module 'mod'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? +tests/cases/conformance/externalModules/es6/es6modulekindWithES5Target9.ts(3,17): error TS2792: Cannot find module 'mod'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? +tests/cases/conformance/externalModules/es6/es6modulekindWithES5Target9.ts(5,20): error TS2792: Cannot find module 'mod'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? +tests/cases/conformance/externalModules/es6/es6modulekindWithES5Target9.ts(13,15): error TS2792: Cannot find module 'mod'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? +tests/cases/conformance/externalModules/es6/es6modulekindWithES5Target9.ts(15,17): error TS2792: Cannot find module 'mod'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? ==== tests/cases/conformance/externalModules/es6/es6modulekindWithES5Target9.ts (5 errors) ==== import d from "mod"; ~~~~~ -!!! error TS2307: Cannot find module 'mod' or its corresponding type declarations. +!!! error TS2792: Cannot find module 'mod'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? import {a} from "mod"; ~~~~~ -!!! error TS2307: Cannot find module 'mod' or its corresponding type declarations. +!!! error TS2792: Cannot find module 'mod'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? import * as M from "mod"; ~~~~~ -!!! error TS2307: Cannot find module 'mod' or its corresponding type declarations. +!!! error TS2792: Cannot find module 'mod'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? export {a}; @@ -26,11 +26,11 @@ tests/cases/conformance/externalModules/es6/es6modulekindWithES5Target9.ts(15,17 export * from "mod"; ~~~~~ -!!! error TS2307: Cannot find module 'mod' or its corresponding type declarations. +!!! error TS2792: Cannot find module 'mod'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? export {b} from "mod" ~~~~~ -!!! error TS2307: Cannot find module 'mod' or its corresponding type declarations. +!!! error TS2792: Cannot find module 'mod'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? export default d; \ No newline at end of file diff --git a/tests/baselines/reference/esnextmodulekindWithES5Target10.errors.txt b/tests/baselines/reference/esnextmodulekindWithES5Target10.errors.txt index 00445d9e1a2..2b5e6b0d687 100644 --- a/tests/baselines/reference/esnextmodulekindWithES5Target10.errors.txt +++ b/tests/baselines/reference/esnextmodulekindWithES5Target10.errors.txt @@ -1,5 +1,5 @@ tests/cases/conformance/externalModules/esnext/esnextmodulekindWithES5Target10.ts(1,1): error TS1202: Import assignment cannot be used when targeting ECMAScript modules. Consider using 'import * as ns from "mod"', 'import {a} from "mod"', 'import d from "mod"', or another module format instead. -tests/cases/conformance/externalModules/esnext/esnextmodulekindWithES5Target10.ts(1,20): error TS2307: Cannot find module 'mod' or its corresponding type declarations. +tests/cases/conformance/externalModules/esnext/esnextmodulekindWithES5Target10.ts(1,20): error TS2792: Cannot find module 'mod'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? tests/cases/conformance/externalModules/esnext/esnextmodulekindWithES5Target10.ts(6,1): error TS1203: Export assignment cannot be used when targeting ECMAScript modules. Consider using 'export default' or another module format instead. @@ -8,7 +8,7 @@ tests/cases/conformance/externalModules/esnext/esnextmodulekindWithES5Target10.t ~~~~~~~~~~~~~~~~~~~~~~~~~~ !!! error TS1202: Import assignment cannot be used when targeting ECMAScript modules. Consider using 'import * as ns from "mod"', 'import {a} from "mod"', 'import d from "mod"', or another module format instead. ~~~~~ -!!! error TS2307: Cannot find module 'mod' or its corresponding type declarations. +!!! error TS2792: Cannot find module 'mod'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? namespace N { diff --git a/tests/baselines/reference/esnextmodulekindWithES5Target9.errors.txt b/tests/baselines/reference/esnextmodulekindWithES5Target9.errors.txt index 476bad6c5d2..95dbd3e0178 100644 --- a/tests/baselines/reference/esnextmodulekindWithES5Target9.errors.txt +++ b/tests/baselines/reference/esnextmodulekindWithES5Target9.errors.txt @@ -1,22 +1,22 @@ -tests/cases/conformance/externalModules/esnext/esnextmodulekindWithES5Target9.ts(1,15): error TS2307: Cannot find module 'mod' or its corresponding type declarations. -tests/cases/conformance/externalModules/esnext/esnextmodulekindWithES5Target9.ts(3,17): error TS2307: Cannot find module 'mod' or its corresponding type declarations. -tests/cases/conformance/externalModules/esnext/esnextmodulekindWithES5Target9.ts(5,20): error TS2307: Cannot find module 'mod' or its corresponding type declarations. -tests/cases/conformance/externalModules/esnext/esnextmodulekindWithES5Target9.ts(13,15): error TS2307: Cannot find module 'mod' or its corresponding type declarations. -tests/cases/conformance/externalModules/esnext/esnextmodulekindWithES5Target9.ts(15,17): error TS2307: Cannot find module 'mod' or its corresponding type declarations. +tests/cases/conformance/externalModules/esnext/esnextmodulekindWithES5Target9.ts(1,15): error TS2792: Cannot find module 'mod'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? +tests/cases/conformance/externalModules/esnext/esnextmodulekindWithES5Target9.ts(3,17): error TS2792: Cannot find module 'mod'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? +tests/cases/conformance/externalModules/esnext/esnextmodulekindWithES5Target9.ts(5,20): error TS2792: Cannot find module 'mod'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? +tests/cases/conformance/externalModules/esnext/esnextmodulekindWithES5Target9.ts(13,15): error TS2792: Cannot find module 'mod'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? +tests/cases/conformance/externalModules/esnext/esnextmodulekindWithES5Target9.ts(15,17): error TS2792: Cannot find module 'mod'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? ==== tests/cases/conformance/externalModules/esnext/esnextmodulekindWithES5Target9.ts (5 errors) ==== import d from "mod"; ~~~~~ -!!! error TS2307: Cannot find module 'mod' or its corresponding type declarations. +!!! error TS2792: Cannot find module 'mod'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? import {a} from "mod"; ~~~~~ -!!! error TS2307: Cannot find module 'mod' or its corresponding type declarations. +!!! error TS2792: Cannot find module 'mod'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? import * as M from "mod"; ~~~~~ -!!! error TS2307: Cannot find module 'mod' or its corresponding type declarations. +!!! error TS2792: Cannot find module 'mod'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? export {a}; @@ -26,11 +26,11 @@ tests/cases/conformance/externalModules/esnext/esnextmodulekindWithES5Target9.ts export * from "mod"; ~~~~~ -!!! error TS2307: Cannot find module 'mod' or its corresponding type declarations. +!!! error TS2792: Cannot find module 'mod'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? export {b} from "mod" ~~~~~ -!!! error TS2307: Cannot find module 'mod' or its corresponding type declarations. +!!! error TS2792: Cannot find module 'mod'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? export default d; \ No newline at end of file diff --git a/tests/baselines/reference/exportAsNamespace_nonExistent.errors.txt b/tests/baselines/reference/exportAsNamespace_nonExistent.errors.txt index c8985bee196..159226de0f4 100644 --- a/tests/baselines/reference/exportAsNamespace_nonExistent.errors.txt +++ b/tests/baselines/reference/exportAsNamespace_nonExistent.errors.txt @@ -1,8 +1,8 @@ -tests/cases/conformance/es2020/modules/exportAsNamespace_nonExistent.ts(1,21): error TS2307: Cannot find module './nonexistent' or its corresponding type declarations. +tests/cases/conformance/es2020/modules/exportAsNamespace_nonExistent.ts(1,21): error TS2792: Cannot find module './nonexistent'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? ==== tests/cases/conformance/es2020/modules/exportAsNamespace_nonExistent.ts (1 errors) ==== export * as ns from './nonexistent'; // Error ~~~~~~~~~~~~~~~ -!!! error TS2307: Cannot find module './nonexistent' or its corresponding type declarations. +!!! error TS2792: Cannot find module './nonexistent'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? \ No newline at end of file diff --git a/tests/baselines/reference/project/cantFindTheModule/amd/cantFindTheModule.errors.txt b/tests/baselines/reference/project/cantFindTheModule/amd/cantFindTheModule.errors.txt index 72835d5511d..27d52a2f702 100644 --- a/tests/baselines/reference/project/cantFindTheModule/amd/cantFindTheModule.errors.txt +++ b/tests/baselines/reference/project/cantFindTheModule/amd/cantFindTheModule.errors.txt @@ -1,18 +1,18 @@ -decl.ts(1,26): error TS2307: Cannot find module './foo/bar.tx' or its corresponding type declarations. -decl.ts(2,26): error TS2307: Cannot find module 'baz' or its corresponding type declarations. -decl.ts(3,26): error TS2307: Cannot find module './baz' or its corresponding type declarations. +decl.ts(1,26): error TS2792: Cannot find module './foo/bar.tx'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? +decl.ts(2,26): error TS2792: Cannot find module 'baz'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? +decl.ts(3,26): error TS2792: Cannot find module './baz'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? ==== decl.ts (3 errors) ==== import modErr = require("./foo/bar.tx"); ~~~~~~~~~~~~~~ -!!! error TS2307: Cannot find module './foo/bar.tx' or its corresponding type declarations. +!!! error TS2792: Cannot find module './foo/bar.tx'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? import modErr1 = require("baz"); ~~~~~ -!!! error TS2307: Cannot find module 'baz' or its corresponding type declarations. +!!! error TS2792: Cannot find module 'baz'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? import modErr2 = require("./baz"); ~~~~~~~ -!!! error TS2307: Cannot find module './baz' or its corresponding type declarations. +!!! error TS2792: Cannot find module './baz'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? //import modErr1 = require("\bar"); diff --git a/tests/baselines/reference/project/cantFindTheModule/node/cantFindTheModule.errors.txt b/tests/baselines/reference/project/cantFindTheModule/node/cantFindTheModule.errors.txt index 72835d5511d..27d52a2f702 100644 --- a/tests/baselines/reference/project/cantFindTheModule/node/cantFindTheModule.errors.txt +++ b/tests/baselines/reference/project/cantFindTheModule/node/cantFindTheModule.errors.txt @@ -1,18 +1,18 @@ -decl.ts(1,26): error TS2307: Cannot find module './foo/bar.tx' or its corresponding type declarations. -decl.ts(2,26): error TS2307: Cannot find module 'baz' or its corresponding type declarations. -decl.ts(3,26): error TS2307: Cannot find module './baz' or its corresponding type declarations. +decl.ts(1,26): error TS2792: Cannot find module './foo/bar.tx'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? +decl.ts(2,26): error TS2792: Cannot find module 'baz'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? +decl.ts(3,26): error TS2792: Cannot find module './baz'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? ==== decl.ts (3 errors) ==== import modErr = require("./foo/bar.tx"); ~~~~~~~~~~~~~~ -!!! error TS2307: Cannot find module './foo/bar.tx' or its corresponding type declarations. +!!! error TS2792: Cannot find module './foo/bar.tx'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? import modErr1 = require("baz"); ~~~~~ -!!! error TS2307: Cannot find module 'baz' or its corresponding type declarations. +!!! error TS2792: Cannot find module 'baz'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? import modErr2 = require("./baz"); ~~~~~~~ -!!! error TS2307: Cannot find module './baz' or its corresponding type declarations. +!!! error TS2792: Cannot find module './baz'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? //import modErr1 = require("\bar"); diff --git a/tests/baselines/reference/project/emitDecoratorMetadataCommonJSISolatedModules/amd/emitDecoratorMetadataCommonJSISolatedModules.errors.txt b/tests/baselines/reference/project/emitDecoratorMetadataCommonJSISolatedModules/amd/emitDecoratorMetadataCommonJSISolatedModules.errors.txt index 30eeb8a44d2..7742c2e1267 100644 --- a/tests/baselines/reference/project/emitDecoratorMetadataCommonJSISolatedModules/amd/emitDecoratorMetadataCommonJSISolatedModules.errors.txt +++ b/tests/baselines/reference/project/emitDecoratorMetadataCommonJSISolatedModules/amd/emitDecoratorMetadataCommonJSISolatedModules.errors.txt @@ -1,4 +1,4 @@ -main.ts(1,21): error TS2307: Cannot find module 'angular2/core' or its corresponding type declarations. +main.ts(1,21): error TS2792: Cannot find module 'angular2/core'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? ==== tsconfig.json (0 errors) ==== @@ -18,7 +18,7 @@ main.ts(1,21): error TS2307: Cannot find module 'angular2/core' or its correspon ==== main.ts (1 errors) ==== import * as ng from "angular2/core"; ~~~~~~~~~~~~~~~ -!!! error TS2307: Cannot find module 'angular2/core' or its corresponding type declarations. +!!! error TS2792: Cannot find module 'angular2/core'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? declare function foo(...args: any[]); diff --git a/tests/baselines/reference/project/emitDecoratorMetadataCommonJSISolatedModules/node/emitDecoratorMetadataCommonJSISolatedModules.errors.txt b/tests/baselines/reference/project/emitDecoratorMetadataCommonJSISolatedModules/node/emitDecoratorMetadataCommonJSISolatedModules.errors.txt index 30eeb8a44d2..7742c2e1267 100644 --- a/tests/baselines/reference/project/emitDecoratorMetadataCommonJSISolatedModules/node/emitDecoratorMetadataCommonJSISolatedModules.errors.txt +++ b/tests/baselines/reference/project/emitDecoratorMetadataCommonJSISolatedModules/node/emitDecoratorMetadataCommonJSISolatedModules.errors.txt @@ -1,4 +1,4 @@ -main.ts(1,21): error TS2307: Cannot find module 'angular2/core' or its corresponding type declarations. +main.ts(1,21): error TS2792: Cannot find module 'angular2/core'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? ==== tsconfig.json (0 errors) ==== @@ -18,7 +18,7 @@ main.ts(1,21): error TS2307: Cannot find module 'angular2/core' or its correspon ==== main.ts (1 errors) ==== import * as ng from "angular2/core"; ~~~~~~~~~~~~~~~ -!!! error TS2307: Cannot find module 'angular2/core' or its corresponding type declarations. +!!! error TS2792: Cannot find module 'angular2/core'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? declare function foo(...args: any[]); diff --git a/tests/baselines/reference/project/emitDecoratorMetadataCommonJSISolatedModulesNoResolve/amd/emitDecoratorMetadataCommonJSISolatedModulesNoResolve.errors.txt b/tests/baselines/reference/project/emitDecoratorMetadataCommonJSISolatedModulesNoResolve/amd/emitDecoratorMetadataCommonJSISolatedModulesNoResolve.errors.txt index 5c605973fea..2f61371ed10 100644 --- a/tests/baselines/reference/project/emitDecoratorMetadataCommonJSISolatedModulesNoResolve/amd/emitDecoratorMetadataCommonJSISolatedModulesNoResolve.errors.txt +++ b/tests/baselines/reference/project/emitDecoratorMetadataCommonJSISolatedModulesNoResolve/amd/emitDecoratorMetadataCommonJSISolatedModulesNoResolve.errors.txt @@ -1,4 +1,4 @@ -main.ts(1,21): error TS2307: Cannot find module 'angular2/core' or its corresponding type declarations. +main.ts(1,21): error TS2792: Cannot find module 'angular2/core'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? ==== tsconfig.json (0 errors) ==== @@ -19,7 +19,7 @@ main.ts(1,21): error TS2307: Cannot find module 'angular2/core' or its correspon ==== main.ts (1 errors) ==== import * as ng from "angular2/core"; ~~~~~~~~~~~~~~~ -!!! error TS2307: Cannot find module 'angular2/core' or its corresponding type declarations. +!!! error TS2792: Cannot find module 'angular2/core'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? declare function foo(...args: any[]); diff --git a/tests/baselines/reference/project/emitDecoratorMetadataCommonJSISolatedModulesNoResolve/node/emitDecoratorMetadataCommonJSISolatedModulesNoResolve.errors.txt b/tests/baselines/reference/project/emitDecoratorMetadataCommonJSISolatedModulesNoResolve/node/emitDecoratorMetadataCommonJSISolatedModulesNoResolve.errors.txt index 5c605973fea..2f61371ed10 100644 --- a/tests/baselines/reference/project/emitDecoratorMetadataCommonJSISolatedModulesNoResolve/node/emitDecoratorMetadataCommonJSISolatedModulesNoResolve.errors.txt +++ b/tests/baselines/reference/project/emitDecoratorMetadataCommonJSISolatedModulesNoResolve/node/emitDecoratorMetadataCommonJSISolatedModulesNoResolve.errors.txt @@ -1,4 +1,4 @@ -main.ts(1,21): error TS2307: Cannot find module 'angular2/core' or its corresponding type declarations. +main.ts(1,21): error TS2792: Cannot find module 'angular2/core'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? ==== tsconfig.json (0 errors) ==== @@ -19,7 +19,7 @@ main.ts(1,21): error TS2307: Cannot find module 'angular2/core' or its correspon ==== main.ts (1 errors) ==== import * as ng from "angular2/core"; ~~~~~~~~~~~~~~~ -!!! error TS2307: Cannot find module 'angular2/core' or its corresponding type declarations. +!!! error TS2792: Cannot find module 'angular2/core'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? declare function foo(...args: any[]); diff --git a/tests/baselines/reference/project/emitDecoratorMetadataSystemJS/amd/emitDecoratorMetadataSystemJS.errors.txt b/tests/baselines/reference/project/emitDecoratorMetadataSystemJS/amd/emitDecoratorMetadataSystemJS.errors.txt index b5d32ac8395..d3eb1dd52d5 100644 --- a/tests/baselines/reference/project/emitDecoratorMetadataSystemJS/amd/emitDecoratorMetadataSystemJS.errors.txt +++ b/tests/baselines/reference/project/emitDecoratorMetadataSystemJS/amd/emitDecoratorMetadataSystemJS.errors.txt @@ -1,4 +1,4 @@ -main.ts(1,21): error TS2307: Cannot find module 'angular2/core' or its corresponding type declarations. +main.ts(1,21): error TS2792: Cannot find module 'angular2/core'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? ==== tsconfig.json (0 errors) ==== @@ -17,7 +17,7 @@ main.ts(1,21): error TS2307: Cannot find module 'angular2/core' or its correspon ==== main.ts (1 errors) ==== import * as ng from "angular2/core"; ~~~~~~~~~~~~~~~ -!!! error TS2307: Cannot find module 'angular2/core' or its corresponding type declarations. +!!! error TS2792: Cannot find module 'angular2/core'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? declare function foo(...args: any[]); diff --git a/tests/baselines/reference/project/emitDecoratorMetadataSystemJS/node/emitDecoratorMetadataSystemJS.errors.txt b/tests/baselines/reference/project/emitDecoratorMetadataSystemJS/node/emitDecoratorMetadataSystemJS.errors.txt index b5d32ac8395..d3eb1dd52d5 100644 --- a/tests/baselines/reference/project/emitDecoratorMetadataSystemJS/node/emitDecoratorMetadataSystemJS.errors.txt +++ b/tests/baselines/reference/project/emitDecoratorMetadataSystemJS/node/emitDecoratorMetadataSystemJS.errors.txt @@ -1,4 +1,4 @@ -main.ts(1,21): error TS2307: Cannot find module 'angular2/core' or its corresponding type declarations. +main.ts(1,21): error TS2792: Cannot find module 'angular2/core'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? ==== tsconfig.json (0 errors) ==== @@ -17,7 +17,7 @@ main.ts(1,21): error TS2307: Cannot find module 'angular2/core' or its correspon ==== main.ts (1 errors) ==== import * as ng from "angular2/core"; ~~~~~~~~~~~~~~~ -!!! error TS2307: Cannot find module 'angular2/core' or its corresponding type declarations. +!!! error TS2792: Cannot find module 'angular2/core'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? declare function foo(...args: any[]); diff --git a/tests/baselines/reference/project/emitDecoratorMetadataSystemJSISolatedModules/amd/emitDecoratorMetadataSystemJSISolatedModules.errors.txt b/tests/baselines/reference/project/emitDecoratorMetadataSystemJSISolatedModules/amd/emitDecoratorMetadataSystemJSISolatedModules.errors.txt index a9514189f21..a91e1ad3b81 100644 --- a/tests/baselines/reference/project/emitDecoratorMetadataSystemJSISolatedModules/amd/emitDecoratorMetadataSystemJSISolatedModules.errors.txt +++ b/tests/baselines/reference/project/emitDecoratorMetadataSystemJSISolatedModules/amd/emitDecoratorMetadataSystemJSISolatedModules.errors.txt @@ -1,4 +1,4 @@ -main.ts(1,21): error TS2307: Cannot find module 'angular2/core' or its corresponding type declarations. +main.ts(1,21): error TS2792: Cannot find module 'angular2/core'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? ==== tsconfig.json (0 errors) ==== @@ -19,7 +19,7 @@ main.ts(1,21): error TS2307: Cannot find module 'angular2/core' or its correspon ==== main.ts (1 errors) ==== import * as ng from "angular2/core"; ~~~~~~~~~~~~~~~ -!!! error TS2307: Cannot find module 'angular2/core' or its corresponding type declarations. +!!! error TS2792: Cannot find module 'angular2/core'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? declare function foo(...args: any[]); diff --git a/tests/baselines/reference/project/emitDecoratorMetadataSystemJSISolatedModules/node/emitDecoratorMetadataSystemJSISolatedModules.errors.txt b/tests/baselines/reference/project/emitDecoratorMetadataSystemJSISolatedModules/node/emitDecoratorMetadataSystemJSISolatedModules.errors.txt index a9514189f21..a91e1ad3b81 100644 --- a/tests/baselines/reference/project/emitDecoratorMetadataSystemJSISolatedModules/node/emitDecoratorMetadataSystemJSISolatedModules.errors.txt +++ b/tests/baselines/reference/project/emitDecoratorMetadataSystemJSISolatedModules/node/emitDecoratorMetadataSystemJSISolatedModules.errors.txt @@ -1,4 +1,4 @@ -main.ts(1,21): error TS2307: Cannot find module 'angular2/core' or its corresponding type declarations. +main.ts(1,21): error TS2792: Cannot find module 'angular2/core'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? ==== tsconfig.json (0 errors) ==== @@ -19,7 +19,7 @@ main.ts(1,21): error TS2307: Cannot find module 'angular2/core' or its correspon ==== main.ts (1 errors) ==== import * as ng from "angular2/core"; ~~~~~~~~~~~~~~~ -!!! error TS2307: Cannot find module 'angular2/core' or its corresponding type declarations. +!!! error TS2792: Cannot find module 'angular2/core'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? declare function foo(...args: any[]); diff --git a/tests/baselines/reference/project/emitDecoratorMetadataSystemJSISolatedModulesNoResolve/amd/emitDecoratorMetadataSystemJSISolatedModulesNoResolve.errors.txt b/tests/baselines/reference/project/emitDecoratorMetadataSystemJSISolatedModulesNoResolve/amd/emitDecoratorMetadataSystemJSISolatedModulesNoResolve.errors.txt index 3852af98200..0da01da5903 100644 --- a/tests/baselines/reference/project/emitDecoratorMetadataSystemJSISolatedModulesNoResolve/amd/emitDecoratorMetadataSystemJSISolatedModulesNoResolve.errors.txt +++ b/tests/baselines/reference/project/emitDecoratorMetadataSystemJSISolatedModulesNoResolve/amd/emitDecoratorMetadataSystemJSISolatedModulesNoResolve.errors.txt @@ -1,4 +1,4 @@ -main.ts(1,21): error TS2307: Cannot find module 'angular2/core' or its corresponding type declarations. +main.ts(1,21): error TS2792: Cannot find module 'angular2/core'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? ==== tsconfig.json (0 errors) ==== @@ -20,7 +20,7 @@ main.ts(1,21): error TS2307: Cannot find module 'angular2/core' or its correspon ==== main.ts (1 errors) ==== import * as ng from "angular2/core"; ~~~~~~~~~~~~~~~ -!!! error TS2307: Cannot find module 'angular2/core' or its corresponding type declarations. +!!! error TS2792: Cannot find module 'angular2/core'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? declare function foo(...args: any[]); diff --git a/tests/baselines/reference/project/emitDecoratorMetadataSystemJSISolatedModulesNoResolve/node/emitDecoratorMetadataSystemJSISolatedModulesNoResolve.errors.txt b/tests/baselines/reference/project/emitDecoratorMetadataSystemJSISolatedModulesNoResolve/node/emitDecoratorMetadataSystemJSISolatedModulesNoResolve.errors.txt index 3852af98200..0da01da5903 100644 --- a/tests/baselines/reference/project/emitDecoratorMetadataSystemJSISolatedModulesNoResolve/node/emitDecoratorMetadataSystemJSISolatedModulesNoResolve.errors.txt +++ b/tests/baselines/reference/project/emitDecoratorMetadataSystemJSISolatedModulesNoResolve/node/emitDecoratorMetadataSystemJSISolatedModulesNoResolve.errors.txt @@ -1,4 +1,4 @@ -main.ts(1,21): error TS2307: Cannot find module 'angular2/core' or its corresponding type declarations. +main.ts(1,21): error TS2792: Cannot find module 'angular2/core'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? ==== tsconfig.json (0 errors) ==== @@ -20,7 +20,7 @@ main.ts(1,21): error TS2307: Cannot find module 'angular2/core' or its correspon ==== main.ts (1 errors) ==== import * as ng from "angular2/core"; ~~~~~~~~~~~~~~~ -!!! error TS2307: Cannot find module 'angular2/core' or its corresponding type declarations. +!!! error TS2792: Cannot find module 'angular2/core'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? declare function foo(...args: any[]); diff --git a/tests/baselines/reference/project/intReferencingExtAndInt/amd/intReferencingExtAndInt.errors.txt b/tests/baselines/reference/project/intReferencingExtAndInt/amd/intReferencingExtAndInt.errors.txt index c6d05210818..bb4fb072b4c 100644 --- a/tests/baselines/reference/project/intReferencingExtAndInt/amd/intReferencingExtAndInt.errors.txt +++ b/tests/baselines/reference/project/intReferencingExtAndInt/amd/intReferencingExtAndInt.errors.txt @@ -1,5 +1,5 @@ internal2.ts(2,21): error TS1147: Import declarations in a namespace cannot reference a module. -internal2.ts(2,21): error TS2307: Cannot find module 'external2' or its corresponding type declarations. +internal2.ts(2,21): error TS2792: Cannot find module 'external2'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? ==== internal2.ts (2 errors) ==== @@ -8,7 +8,7 @@ internal2.ts(2,21): error TS2307: Cannot find module 'external2' or its correspo ~~~~~~~~~~~ !!! error TS1147: Import declarations in a namespace cannot reference a module. ~~~~~~~~~~~ -!!! error TS2307: Cannot find module 'external2' or its corresponding type declarations. +!!! error TS2792: Cannot find module 'external2'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? export var a = g.square(5); export var b = "foo"; } \ No newline at end of file diff --git a/tests/baselines/reference/project/intReferencingExtAndInt/node/intReferencingExtAndInt.errors.txt b/tests/baselines/reference/project/intReferencingExtAndInt/node/intReferencingExtAndInt.errors.txt index c6d05210818..bb4fb072b4c 100644 --- a/tests/baselines/reference/project/intReferencingExtAndInt/node/intReferencingExtAndInt.errors.txt +++ b/tests/baselines/reference/project/intReferencingExtAndInt/node/intReferencingExtAndInt.errors.txt @@ -1,5 +1,5 @@ internal2.ts(2,21): error TS1147: Import declarations in a namespace cannot reference a module. -internal2.ts(2,21): error TS2307: Cannot find module 'external2' or its corresponding type declarations. +internal2.ts(2,21): error TS2792: Cannot find module 'external2'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? ==== internal2.ts (2 errors) ==== @@ -8,7 +8,7 @@ internal2.ts(2,21): error TS2307: Cannot find module 'external2' or its correspo ~~~~~~~~~~~ !!! error TS1147: Import declarations in a namespace cannot reference a module. ~~~~~~~~~~~ -!!! error TS2307: Cannot find module 'external2' or its corresponding type declarations. +!!! error TS2792: Cannot find module 'external2'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? export var a = g.square(5); export var b = "foo"; } \ No newline at end of file diff --git a/tests/baselines/reference/project/nestedLocalModuleWithRecursiveTypecheck/amd/nestedLocalModuleWithRecursiveTypecheck.errors.txt b/tests/baselines/reference/project/nestedLocalModuleWithRecursiveTypecheck/amd/nestedLocalModuleWithRecursiveTypecheck.errors.txt index 6c616694a3d..f33239e7f96 100644 --- a/tests/baselines/reference/project/nestedLocalModuleWithRecursiveTypecheck/amd/nestedLocalModuleWithRecursiveTypecheck.errors.txt +++ b/tests/baselines/reference/project/nestedLocalModuleWithRecursiveTypecheck/amd/nestedLocalModuleWithRecursiveTypecheck.errors.txt @@ -1,5 +1,5 @@ test1.ts(3,23): error TS1147: Import declarations in a namespace cannot reference a module. -test1.ts(3,23): error TS2307: Cannot find module 'test2' or its corresponding type declarations. +test1.ts(3,23): error TS2792: Cannot find module 'test2'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? ==== test1.ts (2 errors) ==== @@ -9,7 +9,7 @@ test1.ts(3,23): error TS2307: Cannot find module 'test2' or its corresponding ty ~~~~~~~ !!! error TS1147: Import declarations in a namespace cannot reference a module. ~~~~~~~ -!!! error TS2307: Cannot find module 'test2' or its corresponding type declarations. +!!! error TS2792: Cannot find module 'test2'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? //console.log(foo.$); diff --git a/tests/baselines/reference/project/nestedLocalModuleWithRecursiveTypecheck/node/nestedLocalModuleWithRecursiveTypecheck.errors.txt b/tests/baselines/reference/project/nestedLocalModuleWithRecursiveTypecheck/node/nestedLocalModuleWithRecursiveTypecheck.errors.txt index 6c616694a3d..f33239e7f96 100644 --- a/tests/baselines/reference/project/nestedLocalModuleWithRecursiveTypecheck/node/nestedLocalModuleWithRecursiveTypecheck.errors.txt +++ b/tests/baselines/reference/project/nestedLocalModuleWithRecursiveTypecheck/node/nestedLocalModuleWithRecursiveTypecheck.errors.txt @@ -1,5 +1,5 @@ test1.ts(3,23): error TS1147: Import declarations in a namespace cannot reference a module. -test1.ts(3,23): error TS2307: Cannot find module 'test2' or its corresponding type declarations. +test1.ts(3,23): error TS2792: Cannot find module 'test2'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? ==== test1.ts (2 errors) ==== @@ -9,7 +9,7 @@ test1.ts(3,23): error TS2307: Cannot find module 'test2' or its corresponding ty ~~~~~~~ !!! error TS1147: Import declarations in a namespace cannot reference a module. ~~~~~~~ -!!! error TS2307: Cannot find module 'test2' or its corresponding type declarations. +!!! error TS2792: Cannot find module 'test2'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? //console.log(foo.$); diff --git a/tests/baselines/reference/project/privacyCheckOnImportedModuleDeclarationsInsideModule/amd/privacyCheckOnImportedModuleDeclarationsInsideModule.errors.txt b/tests/baselines/reference/project/privacyCheckOnImportedModuleDeclarationsInsideModule/amd/privacyCheckOnImportedModuleDeclarationsInsideModule.errors.txt index ada86f611d3..6e9a578e456 100644 --- a/tests/baselines/reference/project/privacyCheckOnImportedModuleDeclarationsInsideModule/amd/privacyCheckOnImportedModuleDeclarationsInsideModule.errors.txt +++ b/tests/baselines/reference/project/privacyCheckOnImportedModuleDeclarationsInsideModule/amd/privacyCheckOnImportedModuleDeclarationsInsideModule.errors.txt @@ -1,7 +1,7 @@ testGlo.ts(2,39): error TS1147: Import declarations in a namespace cannot reference a module. -testGlo.ts(2,39): error TS2307: Cannot find module 'mExported' or its corresponding type declarations. +testGlo.ts(2,39): error TS2792: Cannot find module 'mExported'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? testGlo.ts(21,35): error TS1147: Import declarations in a namespace cannot reference a module. -testGlo.ts(21,35): error TS2307: Cannot find module 'mNonExported' or its corresponding type declarations. +testGlo.ts(21,35): error TS2792: Cannot find module 'mNonExported'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? ==== testGlo.ts (4 errors) ==== @@ -10,7 +10,7 @@ testGlo.ts(21,35): error TS2307: Cannot find module 'mNonExported' or its corres ~~~~~~~~~~~ !!! error TS1147: Import declarations in a namespace cannot reference a module. ~~~~~~~~~~~ -!!! error TS2307: Cannot find module 'mExported' or its corresponding type declarations. +!!! error TS2792: Cannot find module 'mExported'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? export var c1 = new mExported.me.class1; export function f1() { return new mExported.me.class1(); @@ -33,7 +33,7 @@ testGlo.ts(21,35): error TS2307: Cannot find module 'mNonExported' or its corres ~~~~~~~~~~~~~~ !!! error TS1147: Import declarations in a namespace cannot reference a module. ~~~~~~~~~~~~~~ -!!! error TS2307: Cannot find module 'mNonExported' or its corresponding type declarations. +!!! error TS2792: Cannot find module 'mNonExported'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? export var c3 = new mNonExported.mne.class1; export function f3() { return new mNonExported.mne.class1(); diff --git a/tests/baselines/reference/project/privacyCheckOnImportedModuleDeclarationsInsideModule/node/privacyCheckOnImportedModuleDeclarationsInsideModule.errors.txt b/tests/baselines/reference/project/privacyCheckOnImportedModuleDeclarationsInsideModule/node/privacyCheckOnImportedModuleDeclarationsInsideModule.errors.txt index ada86f611d3..6e9a578e456 100644 --- a/tests/baselines/reference/project/privacyCheckOnImportedModuleDeclarationsInsideModule/node/privacyCheckOnImportedModuleDeclarationsInsideModule.errors.txt +++ b/tests/baselines/reference/project/privacyCheckOnImportedModuleDeclarationsInsideModule/node/privacyCheckOnImportedModuleDeclarationsInsideModule.errors.txt @@ -1,7 +1,7 @@ testGlo.ts(2,39): error TS1147: Import declarations in a namespace cannot reference a module. -testGlo.ts(2,39): error TS2307: Cannot find module 'mExported' or its corresponding type declarations. +testGlo.ts(2,39): error TS2792: Cannot find module 'mExported'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? testGlo.ts(21,35): error TS1147: Import declarations in a namespace cannot reference a module. -testGlo.ts(21,35): error TS2307: Cannot find module 'mNonExported' or its corresponding type declarations. +testGlo.ts(21,35): error TS2792: Cannot find module 'mNonExported'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? ==== testGlo.ts (4 errors) ==== @@ -10,7 +10,7 @@ testGlo.ts(21,35): error TS2307: Cannot find module 'mNonExported' or its corres ~~~~~~~~~~~ !!! error TS1147: Import declarations in a namespace cannot reference a module. ~~~~~~~~~~~ -!!! error TS2307: Cannot find module 'mExported' or its corresponding type declarations. +!!! error TS2792: Cannot find module 'mExported'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? export var c1 = new mExported.me.class1; export function f1() { return new mExported.me.class1(); @@ -33,7 +33,7 @@ testGlo.ts(21,35): error TS2307: Cannot find module 'mNonExported' or its corres ~~~~~~~~~~~~~~ !!! error TS1147: Import declarations in a namespace cannot reference a module. ~~~~~~~~~~~~~~ -!!! error TS2307: Cannot find module 'mNonExported' or its corresponding type declarations. +!!! error TS2792: Cannot find module 'mNonExported'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? export var c3 = new mNonExported.mne.class1; export function f3() { return new mNonExported.mne.class1(); diff --git a/tests/baselines/reference/project/privacyCheckOnImportedModuleDeclarationsInsideNonExportedModule/amd/privacyCheckOnImportedModuleDeclarationsInsideNonExportedModule.errors.txt b/tests/baselines/reference/project/privacyCheckOnImportedModuleDeclarationsInsideNonExportedModule/amd/privacyCheckOnImportedModuleDeclarationsInsideNonExportedModule.errors.txt index dc26cfdca3f..37238fdae37 100644 --- a/tests/baselines/reference/project/privacyCheckOnImportedModuleDeclarationsInsideNonExportedModule/amd/privacyCheckOnImportedModuleDeclarationsInsideNonExportedModule.errors.txt +++ b/tests/baselines/reference/project/privacyCheckOnImportedModuleDeclarationsInsideNonExportedModule/amd/privacyCheckOnImportedModuleDeclarationsInsideNonExportedModule.errors.txt @@ -1,7 +1,7 @@ test.ts(5,39): error TS1147: Import declarations in a namespace cannot reference a module. -test.ts(5,39): error TS2307: Cannot find module 'mExported' or its corresponding type declarations. +test.ts(5,39): error TS2792: Cannot find module 'mExported'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? test.ts(24,35): error TS1147: Import declarations in a namespace cannot reference a module. -test.ts(24,35): error TS2307: Cannot find module 'mNonExported' or its corresponding type declarations. +test.ts(24,35): error TS2792: Cannot find module 'mNonExported'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? ==== test.ts (4 errors) ==== @@ -13,7 +13,7 @@ test.ts(24,35): error TS2307: Cannot find module 'mNonExported' or its correspon ~~~~~~~~~~~ !!! error TS1147: Import declarations in a namespace cannot reference a module. ~~~~~~~~~~~ -!!! error TS2307: Cannot find module 'mExported' or its corresponding type declarations. +!!! error TS2792: Cannot find module 'mExported'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? export var c1 = new mExported.me.class1; export function f1() { return new mExported.me.class1(); @@ -36,7 +36,7 @@ test.ts(24,35): error TS2307: Cannot find module 'mNonExported' or its correspon ~~~~~~~~~~~~~~ !!! error TS1147: Import declarations in a namespace cannot reference a module. ~~~~~~~~~~~~~~ -!!! error TS2307: Cannot find module 'mNonExported' or its corresponding type declarations. +!!! error TS2792: Cannot find module 'mNonExported'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? export var c3 = new mNonExported.mne.class1; export function f3() { return new mNonExported.mne.class1(); diff --git a/tests/baselines/reference/project/privacyCheckOnImportedModuleDeclarationsInsideNonExportedModule/node/privacyCheckOnImportedModuleDeclarationsInsideNonExportedModule.errors.txt b/tests/baselines/reference/project/privacyCheckOnImportedModuleDeclarationsInsideNonExportedModule/node/privacyCheckOnImportedModuleDeclarationsInsideNonExportedModule.errors.txt index dc26cfdca3f..37238fdae37 100644 --- a/tests/baselines/reference/project/privacyCheckOnImportedModuleDeclarationsInsideNonExportedModule/node/privacyCheckOnImportedModuleDeclarationsInsideNonExportedModule.errors.txt +++ b/tests/baselines/reference/project/privacyCheckOnImportedModuleDeclarationsInsideNonExportedModule/node/privacyCheckOnImportedModuleDeclarationsInsideNonExportedModule.errors.txt @@ -1,7 +1,7 @@ test.ts(5,39): error TS1147: Import declarations in a namespace cannot reference a module. -test.ts(5,39): error TS2307: Cannot find module 'mExported' or its corresponding type declarations. +test.ts(5,39): error TS2792: Cannot find module 'mExported'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? test.ts(24,35): error TS1147: Import declarations in a namespace cannot reference a module. -test.ts(24,35): error TS2307: Cannot find module 'mNonExported' or its corresponding type declarations. +test.ts(24,35): error TS2792: Cannot find module 'mNonExported'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? ==== test.ts (4 errors) ==== @@ -13,7 +13,7 @@ test.ts(24,35): error TS2307: Cannot find module 'mNonExported' or its correspon ~~~~~~~~~~~ !!! error TS1147: Import declarations in a namespace cannot reference a module. ~~~~~~~~~~~ -!!! error TS2307: Cannot find module 'mExported' or its corresponding type declarations. +!!! error TS2792: Cannot find module 'mExported'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? export var c1 = new mExported.me.class1; export function f1() { return new mExported.me.class1(); @@ -36,7 +36,7 @@ test.ts(24,35): error TS2307: Cannot find module 'mNonExported' or its correspon ~~~~~~~~~~~~~~ !!! error TS1147: Import declarations in a namespace cannot reference a module. ~~~~~~~~~~~~~~ -!!! error TS2307: Cannot find module 'mNonExported' or its corresponding type declarations. +!!! error TS2792: Cannot find module 'mNonExported'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? export var c3 = new mNonExported.mne.class1; export function f3() { return new mNonExported.mne.class1(); diff --git a/tests/baselines/reference/project/privacyCheckOnImportedModuleImportStatementInParentModule/amd/privacyCheckOnImportedModuleImportStatementInParentModule.errors.txt b/tests/baselines/reference/project/privacyCheckOnImportedModuleImportStatementInParentModule/amd/privacyCheckOnImportedModuleImportStatementInParentModule.errors.txt index d45bc062186..962bb4820fb 100644 --- a/tests/baselines/reference/project/privacyCheckOnImportedModuleImportStatementInParentModule/amd/privacyCheckOnImportedModuleImportStatementInParentModule.errors.txt +++ b/tests/baselines/reference/project/privacyCheckOnImportedModuleImportStatementInParentModule/amd/privacyCheckOnImportedModuleImportStatementInParentModule.errors.txt @@ -1,7 +1,7 @@ test.ts(2,39): error TS1147: Import declarations in a namespace cannot reference a module. -test.ts(2,39): error TS2307: Cannot find module 'mExported' or its corresponding type declarations. +test.ts(2,39): error TS2792: Cannot find module 'mExported'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? test.ts(42,35): error TS1147: Import declarations in a namespace cannot reference a module. -test.ts(42,35): error TS2307: Cannot find module 'mNonExported' or its corresponding type declarations. +test.ts(42,35): error TS2792: Cannot find module 'mNonExported'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? ==== test.ts (4 errors) ==== @@ -10,7 +10,7 @@ test.ts(42,35): error TS2307: Cannot find module 'mNonExported' or its correspon ~~~~~~~~~~~ !!! error TS1147: Import declarations in a namespace cannot reference a module. ~~~~~~~~~~~ -!!! error TS2307: Cannot find module 'mExported' or its corresponding type declarations. +!!! error TS2792: Cannot find module 'mExported'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? module Internal_M1 { export var c1 = new mExported.me.class1; @@ -54,7 +54,7 @@ test.ts(42,35): error TS2307: Cannot find module 'mNonExported' or its correspon ~~~~~~~~~~~~~~ !!! error TS1147: Import declarations in a namespace cannot reference a module. ~~~~~~~~~~~~~~ -!!! error TS2307: Cannot find module 'mNonExported' or its corresponding type declarations. +!!! error TS2792: Cannot find module 'mNonExported'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? module Internal_M3 { export var c3 = new mNonExported.mne.class1; export function f3() { diff --git a/tests/baselines/reference/project/privacyCheckOnImportedModuleImportStatementInParentModule/node/privacyCheckOnImportedModuleImportStatementInParentModule.errors.txt b/tests/baselines/reference/project/privacyCheckOnImportedModuleImportStatementInParentModule/node/privacyCheckOnImportedModuleImportStatementInParentModule.errors.txt index d45bc062186..962bb4820fb 100644 --- a/tests/baselines/reference/project/privacyCheckOnImportedModuleImportStatementInParentModule/node/privacyCheckOnImportedModuleImportStatementInParentModule.errors.txt +++ b/tests/baselines/reference/project/privacyCheckOnImportedModuleImportStatementInParentModule/node/privacyCheckOnImportedModuleImportStatementInParentModule.errors.txt @@ -1,7 +1,7 @@ test.ts(2,39): error TS1147: Import declarations in a namespace cannot reference a module. -test.ts(2,39): error TS2307: Cannot find module 'mExported' or its corresponding type declarations. +test.ts(2,39): error TS2792: Cannot find module 'mExported'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? test.ts(42,35): error TS1147: Import declarations in a namespace cannot reference a module. -test.ts(42,35): error TS2307: Cannot find module 'mNonExported' or its corresponding type declarations. +test.ts(42,35): error TS2792: Cannot find module 'mNonExported'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? ==== test.ts (4 errors) ==== @@ -10,7 +10,7 @@ test.ts(42,35): error TS2307: Cannot find module 'mNonExported' or its correspon ~~~~~~~~~~~ !!! error TS1147: Import declarations in a namespace cannot reference a module. ~~~~~~~~~~~ -!!! error TS2307: Cannot find module 'mExported' or its corresponding type declarations. +!!! error TS2792: Cannot find module 'mExported'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? module Internal_M1 { export var c1 = new mExported.me.class1; @@ -54,7 +54,7 @@ test.ts(42,35): error TS2307: Cannot find module 'mNonExported' or its correspon ~~~~~~~~~~~~~~ !!! error TS1147: Import declarations in a namespace cannot reference a module. ~~~~~~~~~~~~~~ -!!! error TS2307: Cannot find module 'mNonExported' or its corresponding type declarations. +!!! error TS2792: Cannot find module 'mNonExported'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? module Internal_M3 { export var c3 = new mNonExported.mne.class1; export function f3() { diff --git a/tests/baselines/reference/relativeNamesInClassicResolution.errors.txt b/tests/baselines/reference/relativeNamesInClassicResolution.errors.txt index 518063bc9e4..03a17723a48 100644 --- a/tests/baselines/reference/relativeNamesInClassicResolution.errors.txt +++ b/tests/baselines/reference/relativeNamesInClassicResolution.errors.txt @@ -1,10 +1,10 @@ -tests/cases/compiler/somefolder/a.ts(1,17): error TS2307: Cannot find module './b' or its corresponding type declarations. +tests/cases/compiler/somefolder/a.ts(1,17): error TS2792: Cannot find module './b'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? ==== tests/cases/compiler/somefolder/a.ts (1 errors) ==== import {x} from "./b" ~~~~~ -!!! error TS2307: Cannot find module './b' or its corresponding type declarations. +!!! error TS2792: Cannot find module './b'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? ==== tests/cases/compiler/b.ts (0 errors) ==== export let x = 1; \ No newline at end of file diff --git a/tests/baselines/reference/requireOfJsonFileWithAmd.errors.txt b/tests/baselines/reference/requireOfJsonFileWithAmd.errors.txt index 258d925a70d..43a71b9fbb5 100644 --- a/tests/baselines/reference/requireOfJsonFileWithAmd.errors.txt +++ b/tests/baselines/reference/requireOfJsonFileWithAmd.errors.txt @@ -1,17 +1,17 @@ error TS5070: Option '--resolveJsonModule' cannot be specified without 'node' module resolution strategy. -tests/cases/compiler/file1.ts(1,21): error TS2307: Cannot find module './b' or its corresponding type declarations. -tests/cases/compiler/file1.ts(3,21): error TS2307: Cannot find module './b.json' or its corresponding type declarations. +tests/cases/compiler/file1.ts(1,21): error TS2792: Cannot find module './b'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? +tests/cases/compiler/file1.ts(3,21): error TS2792: Cannot find module './b.json'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? !!! error TS5070: Option '--resolveJsonModule' cannot be specified without 'node' module resolution strategy. ==== tests/cases/compiler/file1.ts (2 errors) ==== import b1 = require('./b'); ~~~~~ -!!! error TS2307: Cannot find module './b' or its corresponding type declarations. +!!! error TS2792: Cannot find module './b'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? let x = b1.a; import b2 = require('./b.json'); ~~~~~~~~~~ -!!! error TS2307: Cannot find module './b.json' or its corresponding type declarations. +!!! error TS2792: Cannot find module './b.json'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? if (x) { let b = b2.b; x = (b1.b === b); diff --git a/tests/baselines/reference/requireOfJsonFileWithModuleEmitNone.errors.txt b/tests/baselines/reference/requireOfJsonFileWithModuleEmitNone.errors.txt index 1ec53ee17f9..ac67223d7e6 100644 --- a/tests/baselines/reference/requireOfJsonFileWithModuleEmitNone.errors.txt +++ b/tests/baselines/reference/requireOfJsonFileWithModuleEmitNone.errors.txt @@ -1,6 +1,6 @@ error TS5070: Option '--resolveJsonModule' cannot be specified without 'node' module resolution strategy. tests/cases/compiler/file1.ts(1,1): error TS1148: Cannot use imports, exports, or module augmentations when '--module' is 'none'. -tests/cases/compiler/file1.ts(1,20): error TS2307: Cannot find module './b.json' or its corresponding type declarations. +tests/cases/compiler/file1.ts(1,20): error TS2792: Cannot find module './b.json'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? !!! error TS5070: Option '--resolveJsonModule' cannot be specified without 'node' module resolution strategy. @@ -9,7 +9,7 @@ tests/cases/compiler/file1.ts(1,20): error TS2307: Cannot find module './b.json' ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ !!! error TS1148: Cannot use imports, exports, or module augmentations when '--module' is 'none'. ~~~~~~~~~~ -!!! error TS2307: Cannot find module './b.json' or its corresponding type declarations. +!!! error TS2792: Cannot find module './b.json'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? ==== tests/cases/compiler/b.json (0 errors) ==== { diff --git a/tests/baselines/reference/shorthand-property-es5-es6.errors.txt b/tests/baselines/reference/shorthand-property-es5-es6.errors.txt index 31b5eeaadf5..24ed1621be3 100644 --- a/tests/baselines/reference/shorthand-property-es5-es6.errors.txt +++ b/tests/baselines/reference/shorthand-property-es5-es6.errors.txt @@ -1,10 +1,10 @@ -tests/cases/compiler/test.ts(1,19): error TS2307: Cannot find module './foo' or its corresponding type declarations. +tests/cases/compiler/test.ts(1,19): error TS2792: Cannot find module './foo'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? ==== tests/cases/compiler/test.ts (1 errors) ==== import {foo} from './foo'; ~~~~~~~ -!!! error TS2307: Cannot find module './foo' or its corresponding type declarations. +!!! error TS2792: Cannot find module './foo'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? const baz = 42; const bar = { foo, baz }; \ No newline at end of file diff --git a/tests/baselines/reference/shorthand-property-es6-amd.errors.txt b/tests/baselines/reference/shorthand-property-es6-amd.errors.txt index 31b5eeaadf5..24ed1621be3 100644 --- a/tests/baselines/reference/shorthand-property-es6-amd.errors.txt +++ b/tests/baselines/reference/shorthand-property-es6-amd.errors.txt @@ -1,10 +1,10 @@ -tests/cases/compiler/test.ts(1,19): error TS2307: Cannot find module './foo' or its corresponding type declarations. +tests/cases/compiler/test.ts(1,19): error TS2792: Cannot find module './foo'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? ==== tests/cases/compiler/test.ts (1 errors) ==== import {foo} from './foo'; ~~~~~~~ -!!! error TS2307: Cannot find module './foo' or its corresponding type declarations. +!!! error TS2792: Cannot find module './foo'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? const baz = 42; const bar = { foo, baz }; \ No newline at end of file diff --git a/tests/baselines/reference/shorthand-property-es6-es6.errors.txt b/tests/baselines/reference/shorthand-property-es6-es6.errors.txt index 31b5eeaadf5..24ed1621be3 100644 --- a/tests/baselines/reference/shorthand-property-es6-es6.errors.txt +++ b/tests/baselines/reference/shorthand-property-es6-es6.errors.txt @@ -1,10 +1,10 @@ -tests/cases/compiler/test.ts(1,19): error TS2307: Cannot find module './foo' or its corresponding type declarations. +tests/cases/compiler/test.ts(1,19): error TS2792: Cannot find module './foo'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? ==== tests/cases/compiler/test.ts (1 errors) ==== import {foo} from './foo'; ~~~~~~~ -!!! error TS2307: Cannot find module './foo' or its corresponding type declarations. +!!! error TS2792: Cannot find module './foo'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? const baz = 42; const bar = { foo, baz }; \ No newline at end of file diff --git a/tests/baselines/reference/strictModeWordInImportDeclaration.errors.txt b/tests/baselines/reference/strictModeWordInImportDeclaration.errors.txt index 351de7cf7e3..1df32aa1e85 100644 --- a/tests/baselines/reference/strictModeWordInImportDeclaration.errors.txt +++ b/tests/baselines/reference/strictModeWordInImportDeclaration.errors.txt @@ -1,9 +1,9 @@ tests/cases/compiler/strictModeWordInImportDeclaration.ts(2,13): error TS1214: Identifier expected. 'package' is a reserved word in strict mode. Modules are automatically in strict mode. -tests/cases/compiler/strictModeWordInImportDeclaration.ts(2,26): error TS2307: Cannot find module './1' or its corresponding type declarations. +tests/cases/compiler/strictModeWordInImportDeclaration.ts(2,26): error TS2792: Cannot find module './1'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? tests/cases/compiler/strictModeWordInImportDeclaration.ts(3,16): error TS1214: Identifier expected. 'private' is a reserved word in strict mode. Modules are automatically in strict mode. -tests/cases/compiler/strictModeWordInImportDeclaration.ts(3,30): error TS2307: Cannot find module './1' or its corresponding type declarations. +tests/cases/compiler/strictModeWordInImportDeclaration.ts(3,30): error TS2792: Cannot find module './1'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? tests/cases/compiler/strictModeWordInImportDeclaration.ts(4,8): error TS1214: Identifier expected. 'public' is a reserved word in strict mode. Modules are automatically in strict mode. -tests/cases/compiler/strictModeWordInImportDeclaration.ts(4,20): error TS2307: Cannot find module './1' or its corresponding type declarations. +tests/cases/compiler/strictModeWordInImportDeclaration.ts(4,20): error TS2792: Cannot find module './1'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? ==== tests/cases/compiler/strictModeWordInImportDeclaration.ts (6 errors) ==== @@ -12,14 +12,14 @@ tests/cases/compiler/strictModeWordInImportDeclaration.ts(4,20): error TS2307: C ~~~~~~~ !!! error TS1214: Identifier expected. 'package' is a reserved word in strict mode. Modules are automatically in strict mode. ~~~~~ -!!! error TS2307: Cannot find module './1' or its corresponding type declarations. +!!! error TS2792: Cannot find module './1'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? import {foo as private} from "./1" ~~~~~~~ !!! error TS1214: Identifier expected. 'private' is a reserved word in strict mode. Modules are automatically in strict mode. ~~~~~ -!!! error TS2307: Cannot find module './1' or its corresponding type declarations. +!!! error TS2792: Cannot find module './1'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? import public from "./1" ~~~~~~ !!! error TS1214: Identifier expected. 'public' is a reserved word in strict mode. Modules are automatically in strict mode. ~~~~~ -!!! error TS2307: Cannot find module './1' or its corresponding type declarations. \ No newline at end of file +!!! error TS2792: Cannot find module './1'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? \ No newline at end of file diff --git a/tests/baselines/reference/systemModule10.errors.txt b/tests/baselines/reference/systemModule10.errors.txt index 539f1778458..12980ac7b59 100644 --- a/tests/baselines/reference/systemModule10.errors.txt +++ b/tests/baselines/reference/systemModule10.errors.txt @@ -1,14 +1,14 @@ -tests/cases/compiler/systemModule10.ts(1,20): error TS2307: Cannot find module 'file1' or its corresponding type declarations. -tests/cases/compiler/systemModule10.ts(2,21): error TS2307: Cannot find module 'file2' or its corresponding type declarations. +tests/cases/compiler/systemModule10.ts(1,20): error TS2792: Cannot find module 'file1'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? +tests/cases/compiler/systemModule10.ts(2,21): error TS2792: Cannot find module 'file2'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? ==== tests/cases/compiler/systemModule10.ts (2 errors) ==== import n, {x} from 'file1' ~~~~~~~ -!!! error TS2307: Cannot find module 'file1' or its corresponding type declarations. +!!! error TS2792: Cannot find module 'file1'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? import n2 = require('file2'); ~~~~~~~ -!!! error TS2307: Cannot find module 'file2' or its corresponding type declarations. +!!! error TS2792: Cannot find module 'file2'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? export {x} export {x as y} export {n} diff --git a/tests/baselines/reference/systemModule10_ES5.errors.txt b/tests/baselines/reference/systemModule10_ES5.errors.txt index 5e5e47ddbbe..c899f5caddf 100644 --- a/tests/baselines/reference/systemModule10_ES5.errors.txt +++ b/tests/baselines/reference/systemModule10_ES5.errors.txt @@ -1,14 +1,14 @@ -tests/cases/compiler/systemModule10_ES5.ts(1,20): error TS2307: Cannot find module 'file1' or its corresponding type declarations. -tests/cases/compiler/systemModule10_ES5.ts(2,21): error TS2307: Cannot find module 'file2' or its corresponding type declarations. +tests/cases/compiler/systemModule10_ES5.ts(1,20): error TS2792: Cannot find module 'file1'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? +tests/cases/compiler/systemModule10_ES5.ts(2,21): error TS2792: Cannot find module 'file2'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? ==== tests/cases/compiler/systemModule10_ES5.ts (2 errors) ==== import n, {x} from 'file1' ~~~~~~~ -!!! error TS2307: Cannot find module 'file1' or its corresponding type declarations. +!!! error TS2792: Cannot find module 'file1'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? import n2 = require('file2'); ~~~~~~~ -!!! error TS2307: Cannot find module 'file2' or its corresponding type declarations. +!!! error TS2792: Cannot find module 'file2'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? export {x} export {x as y} export {n} diff --git a/tests/baselines/reference/systemModule11.errors.txt b/tests/baselines/reference/systemModule11.errors.txt index 649b764bfcc..0017a9b058d 100644 --- a/tests/baselines/reference/systemModule11.errors.txt +++ b/tests/baselines/reference/systemModule11.errors.txt @@ -1,9 +1,9 @@ -tests/cases/compiler/file1.ts(6,15): error TS2307: Cannot find module 'bar' or its corresponding type declarations. -tests/cases/compiler/file2.ts(6,15): error TS2307: Cannot find module 'bar' or its corresponding type declarations. -tests/cases/compiler/file3.ts(1,25): error TS2307: Cannot find module 'a' or its corresponding type declarations. -tests/cases/compiler/file3.ts(3,15): error TS2307: Cannot find module 'bar' or its corresponding type declarations. -tests/cases/compiler/file4.ts(8,27): error TS2307: Cannot find module 'a' or its corresponding type declarations. -tests/cases/compiler/file5.ts(2,15): error TS2307: Cannot find module 'a' or its corresponding type declarations. +tests/cases/compiler/file1.ts(6,15): error TS2792: Cannot find module 'bar'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? +tests/cases/compiler/file2.ts(6,15): error TS2792: Cannot find module 'bar'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? +tests/cases/compiler/file3.ts(1,25): error TS2792: Cannot find module 'a'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? +tests/cases/compiler/file3.ts(3,15): error TS2792: Cannot find module 'bar'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? +tests/cases/compiler/file4.ts(8,27): error TS2792: Cannot find module 'a'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? +tests/cases/compiler/file5.ts(2,15): error TS2792: Cannot find module 'a'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? ==== tests/cases/compiler/file1.ts (1 errors) ==== @@ -14,7 +14,7 @@ tests/cases/compiler/file5.ts(2,15): error TS2307: Cannot find module 'a' or its export function foo() {} export * from 'bar'; ~~~~~ -!!! error TS2307: Cannot find module 'bar' or its corresponding type declarations. +!!! error TS2792: Cannot find module 'bar'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? ==== tests/cases/compiler/file2.ts (1 errors) ==== var x; @@ -24,16 +24,16 @@ tests/cases/compiler/file5.ts(2,15): error TS2307: Cannot find module 'a' or its export * from 'bar'; ~~~~~ -!!! error TS2307: Cannot find module 'bar' or its corresponding type declarations. +!!! error TS2792: Cannot find module 'bar'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? ==== tests/cases/compiler/file3.ts (2 errors) ==== export {x, y as z} from 'a'; ~~~ -!!! error TS2307: Cannot find module 'a' or its corresponding type declarations. +!!! error TS2792: Cannot find module 'a'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? export default function foo() {} export * from 'bar'; ~~~~~ -!!! error TS2307: Cannot find module 'bar' or its corresponding type declarations. +!!! error TS2792: Cannot find module 'bar'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? ==== tests/cases/compiler/file4.ts (1 errors) ==== export var x; @@ -45,10 +45,10 @@ tests/cases/compiler/file5.ts(2,15): error TS2307: Cannot find module 'a' or its export {s, s1 as s2} from 'a' ~~~ -!!! error TS2307: Cannot find module 'a' or its corresponding type declarations. +!!! error TS2792: Cannot find module 'a'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? ==== tests/cases/compiler/file5.ts (1 errors) ==== function foo() {} export * from 'a'; ~~~ -!!! error TS2307: Cannot find module 'a' or its corresponding type declarations. \ No newline at end of file +!!! error TS2792: Cannot find module 'a'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? \ No newline at end of file diff --git a/tests/baselines/reference/systemModule12.errors.txt b/tests/baselines/reference/systemModule12.errors.txt index 0563f37b16a..9d025f958d0 100644 --- a/tests/baselines/reference/systemModule12.errors.txt +++ b/tests/baselines/reference/systemModule12.errors.txt @@ -1,9 +1,9 @@ -tests/cases/compiler/systemModule12.ts(2,15): error TS2307: Cannot find module 'file1' or its corresponding type declarations. +tests/cases/compiler/systemModule12.ts(2,15): error TS2792: Cannot find module 'file1'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? ==== tests/cases/compiler/systemModule12.ts (1 errors) ==== /// import n from 'file1' ~~~~~~~ -!!! error TS2307: Cannot find module 'file1' or its corresponding type declarations. +!!! error TS2792: Cannot find module 'file1'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? \ No newline at end of file diff --git a/tests/baselines/reference/systemModule14.errors.txt b/tests/baselines/reference/systemModule14.errors.txt index 8b6c0852f27..1688c8a1a6d 100644 --- a/tests/baselines/reference/systemModule14.errors.txt +++ b/tests/baselines/reference/systemModule14.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/systemModule14.ts(5,17): error TS2307: Cannot find module 'foo' or its corresponding type declarations. +tests/cases/compiler/systemModule14.ts(5,17): error TS2792: Cannot find module 'foo'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? ==== tests/cases/compiler/systemModule14.ts (1 errors) ==== @@ -8,7 +8,7 @@ tests/cases/compiler/systemModule14.ts(5,17): error TS2307: Cannot find module ' import {a} from "foo"; ~~~~~ -!!! error TS2307: Cannot find module 'foo' or its corresponding type declarations. +!!! error TS2792: Cannot find module 'foo'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? export {foo} var x = 1; diff --git a/tests/baselines/reference/systemModule16.errors.txt b/tests/baselines/reference/systemModule16.errors.txt index 6f5bf93daac..9dbfba0448c 100644 --- a/tests/baselines/reference/systemModule16.errors.txt +++ b/tests/baselines/reference/systemModule16.errors.txt @@ -1,9 +1,9 @@ -tests/cases/compiler/systemModule16.ts(1,20): error TS2307: Cannot find module 'foo' or its corresponding type declarations. -tests/cases/compiler/systemModule16.ts(2,20): error TS2307: Cannot find module 'bar' or its corresponding type declarations. -tests/cases/compiler/systemModule16.ts(3,15): error TS2307: Cannot find module 'foo' or its corresponding type declarations. -tests/cases/compiler/systemModule16.ts(4,15): error TS2307: Cannot find module 'bar' or its corresponding type declarations. -tests/cases/compiler/systemModule16.ts(7,32): error TS2307: Cannot find module 'foo' or its corresponding type declarations. -tests/cases/compiler/systemModule16.ts(8,32): error TS2307: Cannot find module 'bar' or its corresponding type declarations. +tests/cases/compiler/systemModule16.ts(1,20): error TS2792: Cannot find module 'foo'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? +tests/cases/compiler/systemModule16.ts(2,20): error TS2792: Cannot find module 'bar'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? +tests/cases/compiler/systemModule16.ts(3,15): error TS2792: Cannot find module 'foo'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? +tests/cases/compiler/systemModule16.ts(4,15): error TS2792: Cannot find module 'bar'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? +tests/cases/compiler/systemModule16.ts(7,32): error TS2792: Cannot find module 'foo'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? +tests/cases/compiler/systemModule16.ts(8,32): error TS2792: Cannot find module 'bar'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? tests/cases/compiler/systemModule16.ts(10,1): error TS2695: Left side of comma operator is unused and has no side effects. tests/cases/compiler/systemModule16.ts(10,1): error TS2695: Left side of comma operator is unused and has no side effects. tests/cases/compiler/systemModule16.ts(10,1): error TS2695: Left side of comma operator is unused and has no side effects. @@ -13,24 +13,24 @@ tests/cases/compiler/systemModule16.ts(10,1): error TS2695: Left side of comma o ==== tests/cases/compiler/systemModule16.ts (10 errors) ==== import * as x from "foo"; ~~~~~ -!!! error TS2307: Cannot find module 'foo' or its corresponding type declarations. +!!! error TS2792: Cannot find module 'foo'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? import * as y from "bar"; ~~~~~ -!!! error TS2307: Cannot find module 'bar' or its corresponding type declarations. +!!! error TS2792: Cannot find module 'bar'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? export * from "foo"; ~~~~~ -!!! error TS2307: Cannot find module 'foo' or its corresponding type declarations. +!!! error TS2792: Cannot find module 'foo'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? export * from "bar" ~~~~~ -!!! error TS2307: Cannot find module 'bar' or its corresponding type declarations. +!!! error TS2792: Cannot find module 'bar'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? export {x} export {y} import {a1, b1, c1 as d1} from "foo"; ~~~~~ -!!! error TS2307: Cannot find module 'foo' or its corresponding type declarations. +!!! error TS2792: Cannot find module 'foo'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? export {a2, b2, c2 as d2} from "bar"; ~~~~~ -!!! error TS2307: Cannot find module 'bar' or its corresponding type declarations. +!!! error TS2792: Cannot find module 'bar'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? x,y,a1,b1,d1; ~ diff --git a/tests/baselines/reference/systemModule9.errors.txt b/tests/baselines/reference/systemModule9.errors.txt index c38c85b1798..9b2f30ec37f 100644 --- a/tests/baselines/reference/systemModule9.errors.txt +++ b/tests/baselines/reference/systemModule9.errors.txt @@ -1,28 +1,28 @@ -tests/cases/compiler/systemModule9.ts(1,21): error TS2307: Cannot find module 'file1' or its corresponding type declarations. -tests/cases/compiler/systemModule9.ts(2,25): error TS2307: Cannot find module 'file2' or its corresponding type declarations. -tests/cases/compiler/systemModule9.ts(3,15): error TS2307: Cannot find module 'file3' or its corresponding type declarations. -tests/cases/compiler/systemModule9.ts(5,25): error TS2307: Cannot find module 'file5' or its corresponding type declarations. -tests/cases/compiler/systemModule9.ts(6,22): error TS2307: Cannot find module 'file6' or its corresponding type declarations. -tests/cases/compiler/systemModule9.ts(16,15): error TS2307: Cannot find module 'file7' or its corresponding type declarations. +tests/cases/compiler/systemModule9.ts(1,21): error TS2792: Cannot find module 'file1'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? +tests/cases/compiler/systemModule9.ts(2,25): error TS2792: Cannot find module 'file2'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? +tests/cases/compiler/systemModule9.ts(3,15): error TS2792: Cannot find module 'file3'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? +tests/cases/compiler/systemModule9.ts(5,25): error TS2792: Cannot find module 'file5'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? +tests/cases/compiler/systemModule9.ts(6,22): error TS2792: Cannot find module 'file6'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? +tests/cases/compiler/systemModule9.ts(16,15): error TS2792: Cannot find module 'file7'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? ==== tests/cases/compiler/systemModule9.ts (6 errors) ==== import * as ns from 'file1'; ~~~~~~~ -!!! error TS2307: Cannot find module 'file1' or its corresponding type declarations. +!!! error TS2792: Cannot find module 'file1'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? import {a, b as c} from 'file2'; ~~~~~~~ -!!! error TS2307: Cannot find module 'file2' or its corresponding type declarations. +!!! error TS2792: Cannot find module 'file2'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? import d from 'file3' ~~~~~~~ -!!! error TS2307: Cannot find module 'file3' or its corresponding type declarations. +!!! error TS2792: Cannot find module 'file3'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? import 'file4' import e, * as ns2 from 'file5'; ~~~~~~~ -!!! error TS2307: Cannot find module 'file5' or its corresponding type declarations. +!!! error TS2792: Cannot find module 'file5'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? import ns3 = require('file6'); ~~~~~~~ -!!! error TS2307: Cannot find module 'file6' or its corresponding type declarations. +!!! error TS2792: Cannot find module 'file6'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? ns.f(); a(); @@ -34,7 +34,7 @@ tests/cases/compiler/systemModule9.ts(16,15): error TS2307: Cannot find module ' export * from 'file7'; ~~~~~~~ -!!! error TS2307: Cannot find module 'file7' or its corresponding type declarations. +!!! error TS2792: Cannot find module 'file7'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? var x, y = true; export {x}; diff --git a/tests/baselines/reference/umdDependencyComment2.errors.txt b/tests/baselines/reference/umdDependencyComment2.errors.txt index 417454b1323..d79d74832ec 100644 --- a/tests/baselines/reference/umdDependencyComment2.errors.txt +++ b/tests/baselines/reference/umdDependencyComment2.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/umdDependencyComment2.ts(3,21): error TS2307: Cannot find module 'm2' or its corresponding type declarations. +tests/cases/compiler/umdDependencyComment2.ts(3,21): error TS2792: Cannot find module 'm2'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? ==== tests/cases/compiler/umdDependencyComment2.ts (1 errors) ==== @@ -6,6 +6,6 @@ tests/cases/compiler/umdDependencyComment2.ts(3,21): error TS2307: Cannot find m import m1 = require("m2") ~~~~ -!!! error TS2307: Cannot find module 'm2' or its corresponding type declarations. +!!! error TS2792: Cannot find module 'm2'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? m1.f(); \ No newline at end of file diff --git a/tests/baselines/reference/umdDependencyCommentName1.errors.txt b/tests/baselines/reference/umdDependencyCommentName1.errors.txt index c6e9c622a58..0c88a811e51 100644 --- a/tests/baselines/reference/umdDependencyCommentName1.errors.txt +++ b/tests/baselines/reference/umdDependencyCommentName1.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/umdDependencyCommentName1.ts(3,21): error TS2307: Cannot find module 'm2' or its corresponding type declarations. +tests/cases/compiler/umdDependencyCommentName1.ts(3,21): error TS2792: Cannot find module 'm2'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? ==== tests/cases/compiler/umdDependencyCommentName1.ts (1 errors) ==== @@ -6,6 +6,6 @@ tests/cases/compiler/umdDependencyCommentName1.ts(3,21): error TS2307: Cannot fi import m1 = require("m2") ~~~~ -!!! error TS2307: Cannot find module 'm2' or its corresponding type declarations. +!!! error TS2792: Cannot find module 'm2'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? m1.f(); \ No newline at end of file diff --git a/tests/baselines/reference/umdDependencyCommentName2.errors.txt b/tests/baselines/reference/umdDependencyCommentName2.errors.txt index 1777dee81a5..9293b25d301 100644 --- a/tests/baselines/reference/umdDependencyCommentName2.errors.txt +++ b/tests/baselines/reference/umdDependencyCommentName2.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/umdDependencyCommentName2.ts(5,21): error TS2307: Cannot find module 'm2' or its corresponding type declarations. +tests/cases/compiler/umdDependencyCommentName2.ts(5,21): error TS2792: Cannot find module 'm2'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? ==== tests/cases/compiler/umdDependencyCommentName2.ts (1 errors) ==== @@ -8,6 +8,6 @@ tests/cases/compiler/umdDependencyCommentName2.ts(5,21): error TS2307: Cannot fi import m1 = require("m2") ~~~~ -!!! error TS2307: Cannot find module 'm2' or its corresponding type declarations. +!!! error TS2792: Cannot find module 'm2'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? m1.f(); \ No newline at end of file diff --git a/tests/baselines/reference/undeclaredModuleError.errors.txt b/tests/baselines/reference/undeclaredModuleError.errors.txt index 5da647575fc..05a32e9b4d9 100644 --- a/tests/baselines/reference/undeclaredModuleError.errors.txt +++ b/tests/baselines/reference/undeclaredModuleError.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/undeclaredModuleError.ts(1,21): error TS2307: Cannot find module 'fs' or its corresponding type declarations. +tests/cases/compiler/undeclaredModuleError.ts(1,21): error TS2792: Cannot find module 'fs'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? tests/cases/compiler/undeclaredModuleError.ts(8,29): error TS2345: Argument of type '() => void' is not assignable to parameter of type '(stat: any, name: string) => boolean'. Type 'void' is not assignable to type 'boolean'. tests/cases/compiler/undeclaredModuleError.ts(11,41): error TS2304: Cannot find name 'IDoNotExist'. @@ -7,7 +7,7 @@ tests/cases/compiler/undeclaredModuleError.ts(11,41): error TS2304: Cannot find ==== tests/cases/compiler/undeclaredModuleError.ts (3 errors) ==== import fs = require('fs'); ~~~~ -!!! error TS2307: Cannot find module 'fs' or its corresponding type declarations. +!!! error TS2792: Cannot find module 'fs'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? function readdir(path: string, accept: (stat: fs.Stats, name: string) => boolean, callback: (error: Error, results: { name: string; stat: fs.Stats; }[]) => void ) {} function join(...paths: string[]) {} diff --git a/tests/cases/compiler/errorForBareSpecifierWithImplicitModuleResolutionNone.ts b/tests/cases/compiler/errorForBareSpecifierWithImplicitModuleResolutionNone.ts new file mode 100644 index 00000000000..926820d4975 --- /dev/null +++ b/tests/cases/compiler/errorForBareSpecifierWithImplicitModuleResolutionNone.ts @@ -0,0 +1,5 @@ +// This would be classed as moduleResolutionKind: Classic +// @module: es2015 + +import { thing } from "non-existent-module"; +thing()