mirror of
https://github.com/microsoft/TypeScript.git
synced 2025-11-18 17:21:48 +00:00
Issue better error when unresolvable package in --moduleResolution node10 resolves with --moduleResolution bundler (#56949)
This commit is contained in:
@@ -5185,7 +5185,13 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
|
||||
}
|
||||
}
|
||||
else {
|
||||
error(errorNode, moduleNotFoundError, moduleReference);
|
||||
if (host.getResolvedModule(currentSourceFile, moduleReference, mode)?.alternateResult) {
|
||||
const errorInfo = createModuleNotFoundChain(currentSourceFile, host, moduleReference, mode, moduleReference);
|
||||
errorOrSuggestion(/*isError*/ true, errorNode, chainDiagnosticMessages(errorInfo, moduleNotFoundError, moduleReference));
|
||||
}
|
||||
else {
|
||||
error(errorNode, moduleNotFoundError, moduleReference);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5447,6 +5447,14 @@
|
||||
"category": "Message",
|
||||
"code": 6278
|
||||
},
|
||||
"Resolution of non-relative name failed; trying with '--moduleResolution bundler' to see if project may need configuration update.": {
|
||||
"category": "Message",
|
||||
"code": 6279
|
||||
},
|
||||
"There are types at '{0}', but this result could not be resolved under your current 'moduleResolution' setting. Consider updating to 'node16', 'nodenext', or 'bundler'.": {
|
||||
"category": "Message",
|
||||
"code": 6280
|
||||
},
|
||||
|
||||
"Enable project compilation": {
|
||||
"category": "Message",
|
||||
|
||||
@@ -226,7 +226,7 @@ function createResolvedModuleWithFailedLookupLocationsHandlingSymlink(
|
||||
diagnostics: Diagnostic[],
|
||||
state: ModuleResolutionState,
|
||||
cache: ModuleResolutionCache | NonRelativeModuleNameResolutionCache | undefined,
|
||||
legacyResult?: string,
|
||||
alternateResult?: string,
|
||||
): ResolvedModuleWithFailedLookupLocations {
|
||||
// If this is from node_modules for non relative name, always respect preserveSymlinks
|
||||
if (
|
||||
@@ -248,7 +248,7 @@ function createResolvedModuleWithFailedLookupLocationsHandlingSymlink(
|
||||
diagnostics,
|
||||
state.resultFromCache,
|
||||
cache,
|
||||
legacyResult,
|
||||
alternateResult,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -260,7 +260,7 @@ function createResolvedModuleWithFailedLookupLocations(
|
||||
diagnostics: Diagnostic[],
|
||||
resultFromCache: ResolvedModuleWithFailedLookupLocations | undefined,
|
||||
cache: ModuleResolutionCache | NonRelativeModuleNameResolutionCache | undefined,
|
||||
legacyResult?: string,
|
||||
alternateResult?: string,
|
||||
): ResolvedModuleWithFailedLookupLocations {
|
||||
if (resultFromCache) {
|
||||
if (!cache?.isReadonly) {
|
||||
@@ -290,7 +290,7 @@ function createResolvedModuleWithFailedLookupLocations(
|
||||
failedLookupLocations: initializeResolutionField(failedLookupLocations),
|
||||
affectingLocations: initializeResolutionField(affectingLocations),
|
||||
resolutionDiagnostics: initializeResolutionField(diagnostics),
|
||||
node10Result: legacyResult,
|
||||
alternateResult,
|
||||
};
|
||||
}
|
||||
function initializeResolutionField<T>(value: T[]): T[] | undefined {
|
||||
@@ -325,6 +325,7 @@ export interface ModuleResolutionState {
|
||||
reportDiagnostic: DiagnosticReporter;
|
||||
isConfigLookup: boolean;
|
||||
candidateIsFromPackageJsonField: boolean;
|
||||
resolvedPackageDirectory: boolean;
|
||||
}
|
||||
|
||||
/** Just the fields that we use for module resolution.
|
||||
@@ -602,6 +603,7 @@ export function resolveTypeReferenceDirective(typeReferenceDirectiveName: string
|
||||
reportDiagnostic: diag => void diagnostics.push(diag),
|
||||
isConfigLookup: false,
|
||||
candidateIsFromPackageJsonField: false,
|
||||
resolvedPackageDirectory: false,
|
||||
};
|
||||
let resolved = primaryLookup();
|
||||
let primary = true;
|
||||
@@ -1839,6 +1841,7 @@ function nodeModuleNameResolverWorker(
|
||||
reportDiagnostic: diag => void diagnostics.push(diag),
|
||||
isConfigLookup,
|
||||
candidateIsFromPackageJsonField: false,
|
||||
resolvedPackageDirectory: false,
|
||||
};
|
||||
if (traceEnabled && moduleResolutionSupportsPackageJsonExportsAndImports(moduleResolution)) {
|
||||
trace(host, Diagnostics.Resolving_in_0_mode_with_conditions_1, features & NodeResolutionFeatures.EsmMode ? "ESM" : "CJS", state.conditions.map(c => `'${c}'`).join(", "));
|
||||
@@ -1856,27 +1859,45 @@ function nodeModuleNameResolverWorker(
|
||||
result = tryResolve(extensions, state);
|
||||
}
|
||||
|
||||
// For non-relative names that resolved to JS but no types in modes that look up an "import" condition in package.json "exports",
|
||||
// try again with "exports" disabled to try to detect if this is likely a configuration error in a dependency's package.json.
|
||||
let legacyResult;
|
||||
if (
|
||||
result?.value?.isExternalLibraryImport
|
||||
&& !isConfigLookup
|
||||
&& extensions & (Extensions.TypeScript | Extensions.Declaration)
|
||||
&& features & NodeResolutionFeatures.Exports
|
||||
&& !isExternalModuleNameRelative(moduleName)
|
||||
&& !extensionIsOk(Extensions.TypeScript | Extensions.Declaration, result.value.resolved.extension)
|
||||
&& conditions?.includes("import")
|
||||
) {
|
||||
traceIfEnabled(state, Diagnostics.Resolution_of_non_relative_name_failed_trying_with_modern_Node_resolution_features_disabled_to_see_if_npm_library_needs_configuration_update);
|
||||
const diagnosticState = {
|
||||
...state,
|
||||
features: state.features & ~NodeResolutionFeatures.Exports,
|
||||
reportDiagnostic: noop,
|
||||
};
|
||||
const diagnosticResult = tryResolve(extensions & (Extensions.TypeScript | Extensions.Declaration), diagnosticState);
|
||||
if (diagnosticResult?.value?.isExternalLibraryImport) {
|
||||
legacyResult = diagnosticResult.value.resolved.path;
|
||||
let alternateResult;
|
||||
if (state.resolvedPackageDirectory && !isConfigLookup && !isExternalModuleNameRelative(moduleName)) {
|
||||
const wantedTypesButGotJs = result?.value
|
||||
&& extensions & (Extensions.TypeScript | Extensions.Declaration)
|
||||
&& !extensionIsOk(Extensions.TypeScript | Extensions.Declaration, result.value.resolved.extension);
|
||||
if (
|
||||
result?.value?.isExternalLibraryImport
|
||||
&& wantedTypesButGotJs
|
||||
&& features & NodeResolutionFeatures.Exports
|
||||
&& conditions?.includes("import")
|
||||
) {
|
||||
traceIfEnabled(state, Diagnostics.Resolution_of_non_relative_name_failed_trying_with_modern_Node_resolution_features_disabled_to_see_if_npm_library_needs_configuration_update);
|
||||
const diagnosticState = {
|
||||
...state,
|
||||
features: state.features & ~NodeResolutionFeatures.Exports,
|
||||
reportDiagnostic: noop,
|
||||
};
|
||||
const diagnosticResult = tryResolve(extensions & (Extensions.TypeScript | Extensions.Declaration), diagnosticState);
|
||||
if (diagnosticResult?.value?.isExternalLibraryImport) {
|
||||
alternateResult = diagnosticResult.value.resolved.path;
|
||||
}
|
||||
}
|
||||
else if (
|
||||
(!result?.value || wantedTypesButGotJs)
|
||||
&& moduleResolution === ModuleResolutionKind.Node10
|
||||
) {
|
||||
traceIfEnabled(state, Diagnostics.Resolution_of_non_relative_name_failed_trying_with_moduleResolution_bundler_to_see_if_project_may_need_configuration_update);
|
||||
const diagnosticsCompilerOptions = { ...state.compilerOptions, moduleResolution: ModuleResolutionKind.Bundler };
|
||||
const diagnosticState = {
|
||||
...state,
|
||||
compilerOptions: diagnosticsCompilerOptions,
|
||||
features: NodeResolutionFeatures.BundlerDefault,
|
||||
conditions: getConditions(diagnosticsCompilerOptions),
|
||||
reportDiagnostic: noop,
|
||||
};
|
||||
const diagnosticResult = tryResolve(extensions & (Extensions.TypeScript | Extensions.Declaration), diagnosticState);
|
||||
if (diagnosticResult?.value?.isExternalLibraryImport) {
|
||||
alternateResult = diagnosticResult.value.resolved.path;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1889,7 +1910,7 @@ function nodeModuleNameResolverWorker(
|
||||
diagnostics,
|
||||
state,
|
||||
cache,
|
||||
legacyResult,
|
||||
alternateResult,
|
||||
);
|
||||
|
||||
function tryResolve(extensions: Extensions, state: ModuleResolutionState): SearchResult<{ resolved: Resolved; isExternalLibraryImport: boolean; }> {
|
||||
@@ -2350,6 +2371,7 @@ export function getTemporaryModuleResolutionState(packageJsonInfoCache: PackageJ
|
||||
reportDiagnostic: noop,
|
||||
isConfigLookup: false,
|
||||
candidateIsFromPackageJsonField: false,
|
||||
resolvedPackageDirectory: false,
|
||||
};
|
||||
}
|
||||
|
||||
@@ -3072,6 +3094,9 @@ function loadModuleFromSpecificNodeModulesDirectory(extensions: Extensions, modu
|
||||
// Previous `packageInfo` may have been from a nested package.json; ensure we have the one from the package root now.
|
||||
packageInfo = rootPackageInfo ?? getPackageJsonInfo(packageDirectory, !nodeModulesDirectoryExists, state);
|
||||
}
|
||||
if (packageInfo) {
|
||||
state.resolvedPackageDirectory = true;
|
||||
}
|
||||
// package exports are higher priority than file/directory/typesVersions lookups and (and, if there's exports present, blocks them)
|
||||
if (packageInfo && packageInfo.contents.packageJsonContent.exports && state.features & NodeResolutionFeatures.Exports) {
|
||||
return loadModuleFromExports(packageInfo, extensions, combinePaths(".", rest), state, cache, redirectedReference)?.value;
|
||||
@@ -3202,6 +3227,7 @@ export function classicNameResolver(moduleName: string, containingFile: string,
|
||||
reportDiagnostic: diag => void diagnostics.push(diag),
|
||||
isConfigLookup: false,
|
||||
candidateIsFromPackageJsonField: false,
|
||||
resolvedPackageDirectory: false,
|
||||
};
|
||||
|
||||
const resolved = tryResolve(Extensions.TypeScript | Extensions.Declaration) ||
|
||||
@@ -3302,6 +3328,7 @@ export function loadModuleFromGlobalCache(moduleName: string, projectName: strin
|
||||
reportDiagnostic: diag => void diagnostics.push(diag),
|
||||
isConfigLookup: false,
|
||||
candidateIsFromPackageJsonField: false,
|
||||
resolvedPackageDirectory: false,
|
||||
};
|
||||
const resolved = loadModuleFromImmediateNodeModulesDirectory(Extensions.Declaration, moduleName, globalCache, state, /*typesScopeOnly*/ false, /*cache*/ undefined, /*redirectedReference*/ undefined);
|
||||
return createResolvedModuleWithFailedLookupLocations(
|
||||
|
||||
@@ -168,7 +168,7 @@ export interface ResolutionWithFailedLookupLocations {
|
||||
refCount?: number;
|
||||
// Files that have this resolution using
|
||||
files?: Set<Path>;
|
||||
node10Result?: string;
|
||||
alternateResult?: string;
|
||||
}
|
||||
|
||||
/** @internal */
|
||||
@@ -1092,9 +1092,9 @@ export function createResolutionCache(resolutionHost: ResolutionCacheHost, rootD
|
||||
function watchFailedLookupLocationOfResolution(resolution: ResolutionWithFailedLookupLocations) {
|
||||
Debug.assert(!!resolution.refCount);
|
||||
|
||||
const { failedLookupLocations, affectingLocations, node10Result } = resolution;
|
||||
if (!failedLookupLocations?.length && !affectingLocations?.length && !node10Result) return;
|
||||
if (failedLookupLocations?.length || node10Result) resolutionsWithFailedLookups.add(resolution);
|
||||
const { failedLookupLocations, affectingLocations, alternateResult } = resolution;
|
||||
if (!failedLookupLocations?.length && !affectingLocations?.length && !alternateResult) return;
|
||||
if (failedLookupLocations?.length || alternateResult) resolutionsWithFailedLookups.add(resolution);
|
||||
|
||||
let setAtRoot = false;
|
||||
if (failedLookupLocations) {
|
||||
@@ -1102,12 +1102,12 @@ export function createResolutionCache(resolutionHost: ResolutionCacheHost, rootD
|
||||
setAtRoot = watchFailedLookupLocation(failedLookupLocation, setAtRoot);
|
||||
}
|
||||
}
|
||||
if (node10Result) setAtRoot = watchFailedLookupLocation(node10Result, setAtRoot);
|
||||
if (alternateResult) setAtRoot = watchFailedLookupLocation(alternateResult, setAtRoot);
|
||||
if (setAtRoot) {
|
||||
// This is always non recursive
|
||||
setDirectoryWatcher(rootDir, rootPath, /*nonRecursive*/ true);
|
||||
}
|
||||
watchAffectingLocationsOfResolution(resolution, !failedLookupLocations?.length && !node10Result);
|
||||
watchAffectingLocationsOfResolution(resolution, !failedLookupLocations?.length && !alternateResult);
|
||||
}
|
||||
|
||||
function watchAffectingLocationsOfResolution(resolution: ResolutionWithFailedLookupLocations, addToResolutionsWithOnlyAffectingLocations: boolean) {
|
||||
@@ -1247,7 +1247,7 @@ export function createResolutionCache(resolutionHost: ResolutionCacheHost, rootD
|
||||
if (resolutions?.delete(resolution) && !resolutions.size) resolvedFileToResolution.delete(key);
|
||||
}
|
||||
|
||||
const { failedLookupLocations, affectingLocations, node10Result } = resolution;
|
||||
const { failedLookupLocations, affectingLocations, alternateResult } = resolution;
|
||||
if (resolutionsWithFailedLookups.delete(resolution)) {
|
||||
let removeAtRoot = false;
|
||||
if (failedLookupLocations) {
|
||||
@@ -1255,7 +1255,7 @@ export function createResolutionCache(resolutionHost: ResolutionCacheHost, rootD
|
||||
removeAtRoot = stopWatchFailedLookupLocation(failedLookupLocation, removeAtRoot, syncDirWatcherRemove);
|
||||
}
|
||||
}
|
||||
if (node10Result) removeAtRoot = stopWatchFailedLookupLocation(node10Result, removeAtRoot, syncDirWatcherRemove);
|
||||
if (alternateResult) removeAtRoot = stopWatchFailedLookupLocation(alternateResult, removeAtRoot, syncDirWatcherRemove);
|
||||
if (removeAtRoot) removeDirectoryWatcher(rootPath, syncDirWatcherRemove);
|
||||
}
|
||||
else if (affectingLocations?.length) {
|
||||
@@ -1462,7 +1462,7 @@ export function createResolutionCache(resolutionHost: ResolutionCacheHost, rootD
|
||||
if (canInvalidatedFailedLookupResolutionWithAffectingLocation(resolution)) return true;
|
||||
if (!failedLookupChecks && !startsWithPathChecks && !isInDirectoryChecks) return false;
|
||||
return resolution.failedLookupLocations?.some(location => isInvalidatedFailedLookup(resolutionHost.toPath(location))) ||
|
||||
(!!resolution.node10Result && isInvalidatedFailedLookup(resolutionHost.toPath(resolution.node10Result)));
|
||||
(!!resolution.alternateResult && isInvalidatedFailedLookup(resolutionHost.toPath(resolution.alternateResult)));
|
||||
}
|
||||
|
||||
function isInvalidatedFailedLookup(locationPath: Path) {
|
||||
|
||||
@@ -7752,10 +7752,10 @@ export interface ResolvedModuleWithFailedLookupLocations {
|
||||
resolutionDiagnostics?: Diagnostic[];
|
||||
/**
|
||||
* @internal
|
||||
* Used to issue a diagnostic if typings for a non-relative import couldn't be found
|
||||
* while respecting package.json `exports`, but were found when disabling `exports`.
|
||||
* Used to issue a better diagnostic when an unresolvable module may
|
||||
* have been resolvable under different module resolution settings.
|
||||
*/
|
||||
node10Result?: string;
|
||||
alternateResult?: string;
|
||||
}
|
||||
|
||||
export interface ResolvedTypeReferenceDirective {
|
||||
|
||||
@@ -767,18 +767,23 @@ export function moduleResolutionIsEqualTo(oldResolution: ResolvedModuleWithFaile
|
||||
oldResolution.resolvedModule.resolvedFileName === newResolution.resolvedModule.resolvedFileName &&
|
||||
oldResolution.resolvedModule.originalPath === newResolution.resolvedModule.originalPath &&
|
||||
packageIdIsEqual(oldResolution.resolvedModule.packageId, newResolution.resolvedModule.packageId) &&
|
||||
oldResolution.node10Result === newResolution.node10Result;
|
||||
oldResolution.alternateResult === newResolution.alternateResult;
|
||||
}
|
||||
|
||||
/** @internal */
|
||||
export function createModuleNotFoundChain(sourceFile: SourceFile, host: TypeCheckerHost, moduleReference: string, mode: ResolutionMode, packageName: string) {
|
||||
const node10Result = host.getResolvedModule(sourceFile, moduleReference, mode)?.node10Result;
|
||||
const result = node10Result
|
||||
const alternateResult = host.getResolvedModule(sourceFile, moduleReference, mode)?.alternateResult;
|
||||
const alternateResultMessage = alternateResult && (getEmitModuleResolutionKind(host.getCompilerOptions()) === ModuleResolutionKind.Node10
|
||||
? [Diagnostics.There_are_types_at_0_but_this_result_could_not_be_resolved_under_your_current_moduleResolution_setting_Consider_updating_to_node16_nodenext_or_bundler, [alternateResult]] as const
|
||||
: [
|
||||
Diagnostics.There_are_types_at_0_but_this_result_could_not_be_resolved_when_respecting_package_json_exports_The_1_library_may_need_to_update_its_package_json_or_typings,
|
||||
[alternateResult, alternateResult.includes(nodeModulesPathPart + "@types/") ? `@types/${mangleScopedPackageName(packageName)}` : packageName],
|
||||
] as const);
|
||||
const result = alternateResultMessage
|
||||
? chainDiagnosticMessages(
|
||||
/*details*/ undefined,
|
||||
Diagnostics.There_are_types_at_0_but_this_result_could_not_be_resolved_when_respecting_package_json_exports_The_1_library_may_need_to_update_its_package_json_or_typings,
|
||||
node10Result,
|
||||
node10Result.includes(nodeModulesPathPart + "@types/") ? `@types/${mangleScopedPackageName(packageName)}` : packageName,
|
||||
alternateResultMessage[0],
|
||||
...alternateResultMessage[1],
|
||||
)
|
||||
: host.typesPackageExists(packageName)
|
||||
? chainDiagnosticMessages(
|
||||
|
||||
@@ -331,7 +331,7 @@ export function verifyResolutionCache(
|
||||
resolvedTypeReferenceDirective: (resolved as any).resolvedTypeReferenceDirective,
|
||||
failedLookupLocations: resolved.failedLookupLocations,
|
||||
affectingLocations: resolved.affectingLocations,
|
||||
node10Result: resolved.node10Result,
|
||||
alternateResult: resolved.alternateResult,
|
||||
};
|
||||
expectedToResolution.set(expectedResolution, resolved);
|
||||
resolutionToExpected.set(resolved, expectedResolution);
|
||||
|
||||
+14
-14
@@ -11,7 +11,7 @@ import {
|
||||
libFile,
|
||||
} from "./virtualFileSystemWithWatch";
|
||||
|
||||
export function getFsConentsForNode10ResultAtTypesPackageJson(packageName: string, addTypesCondition: boolean) {
|
||||
export function getFsConentsForAlternateResultAtTypesPackageJson(packageName: string, addTypesCondition: boolean) {
|
||||
return jsonToReadableText({
|
||||
name: `@types/${packageName}`,
|
||||
version: "1.0.0",
|
||||
@@ -25,7 +25,7 @@ export function getFsConentsForNode10ResultAtTypesPackageJson(packageName: strin
|
||||
});
|
||||
}
|
||||
|
||||
export function getFsContentsForNode10ResultPackageJson(packageName: string, addTypes: boolean, addTypesCondition: boolean) {
|
||||
export function getFsContentsForAlternateResultPackageJson(packageName: string, addTypes: boolean, addTypesCondition: boolean) {
|
||||
return jsonToReadableText({
|
||||
name: packageName,
|
||||
version: "1.0.0",
|
||||
@@ -41,7 +41,7 @@ export function getFsContentsForNode10ResultPackageJson(packageName: string, add
|
||||
});
|
||||
}
|
||||
|
||||
export function getFsContentsForNode10ResultDts(packageName: string) {
|
||||
export function getFsContentsForAlternateResultDts(packageName: string) {
|
||||
return `export declare const ${packageName}: number;`;
|
||||
}
|
||||
|
||||
@@ -53,26 +53,26 @@ function mjs(packageName: string) {
|
||||
return `export const ${packageName} = 1;`;
|
||||
}
|
||||
|
||||
export function getFsContentsForNode10Result(): FsContents {
|
||||
export function getFsContentsForAlternateResult(): FsContents {
|
||||
return {
|
||||
"/home/src/projects/project/node_modules/@types/bar/package.json": getFsConentsForNode10ResultAtTypesPackageJson("bar", /*addTypesCondition*/ false),
|
||||
"/home/src/projects/project/node_modules/@types/bar/index.d.ts": getFsContentsForNode10ResultDts("bar"),
|
||||
"/home/src/projects/project/node_modules/bar/package.json": getFsContentsForNode10ResultPackageJson("bar", /*addTypes*/ false, /*addTypesCondition*/ false),
|
||||
"/home/src/projects/project/node_modules/@types/bar/package.json": getFsConentsForAlternateResultAtTypesPackageJson("bar", /*addTypesCondition*/ false),
|
||||
"/home/src/projects/project/node_modules/@types/bar/index.d.ts": getFsContentsForAlternateResultDts("bar"),
|
||||
"/home/src/projects/project/node_modules/bar/package.json": getFsContentsForAlternateResultPackageJson("bar", /*addTypes*/ false, /*addTypesCondition*/ false),
|
||||
"/home/src/projects/project/node_modules/bar/index.js": js("bar"),
|
||||
"/home/src/projects/project/node_modules/bar/index.mjs": mjs("bar"),
|
||||
"/home/src/projects/project/node_modules/foo/package.json": getFsContentsForNode10ResultPackageJson("foo", /*addTypes*/ true, /*addTypesCondition*/ false),
|
||||
"/home/src/projects/project/node_modules/foo/package.json": getFsContentsForAlternateResultPackageJson("foo", /*addTypes*/ true, /*addTypesCondition*/ false),
|
||||
"/home/src/projects/project/node_modules/foo/index.js": js("foo"),
|
||||
"/home/src/projects/project/node_modules/foo/index.mjs": mjs("foo"),
|
||||
"/home/src/projects/project/node_modules/foo/index.d.ts": getFsContentsForNode10ResultDts("foo"),
|
||||
"/home/src/projects/project/node_modules/@types/bar2/package.json": getFsConentsForNode10ResultAtTypesPackageJson("bar2", /*addTypesCondition*/ true),
|
||||
"/home/src/projects/project/node_modules/@types/bar2/index.d.ts": getFsContentsForNode10ResultDts("bar2"),
|
||||
"/home/src/projects/project/node_modules/bar2/package.json": getFsContentsForNode10ResultPackageJson("bar2", /*addTypes*/ false, /*addTypesCondition*/ false),
|
||||
"/home/src/projects/project/node_modules/foo/index.d.ts": getFsContentsForAlternateResultDts("foo"),
|
||||
"/home/src/projects/project/node_modules/@types/bar2/package.json": getFsConentsForAlternateResultAtTypesPackageJson("bar2", /*addTypesCondition*/ true),
|
||||
"/home/src/projects/project/node_modules/@types/bar2/index.d.ts": getFsContentsForAlternateResultDts("bar2"),
|
||||
"/home/src/projects/project/node_modules/bar2/package.json": getFsContentsForAlternateResultPackageJson("bar2", /*addTypes*/ false, /*addTypesCondition*/ false),
|
||||
"/home/src/projects/project/node_modules/bar2/index.js": js("bar2"),
|
||||
"/home/src/projects/project/node_modules/bar2/index.mjs": mjs("bar2"),
|
||||
"/home/src/projects/project/node_modules/foo2/package.json": getFsContentsForNode10ResultPackageJson("foo2", /*addTypes*/ true, /*addTypesCondition*/ true),
|
||||
"/home/src/projects/project/node_modules/foo2/package.json": getFsContentsForAlternateResultPackageJson("foo2", /*addTypes*/ true, /*addTypesCondition*/ true),
|
||||
"/home/src/projects/project/node_modules/foo2/index.js": js("foo2"),
|
||||
"/home/src/projects/project/node_modules/foo2/index.mjs": mjs("foo2"),
|
||||
"/home/src/projects/project/node_modules/foo2/index.d.ts": getFsContentsForNode10ResultDts("foo2"),
|
||||
"/home/src/projects/project/node_modules/foo2/index.d.ts": getFsContentsForAlternateResultDts("foo2"),
|
||||
"/home/src/projects/project/index.mts": dedent`
|
||||
import { foo } from "foo";
|
||||
import { bar } from "bar";
|
||||
@@ -1,9 +1,9 @@
|
||||
import {
|
||||
getFsConentsForNode10ResultAtTypesPackageJson,
|
||||
getFsContentsForNode10Result,
|
||||
getFsContentsForNode10ResultDts,
|
||||
getFsContentsForNode10ResultPackageJson,
|
||||
} from "../helpers/node10Result";
|
||||
getFsConentsForAlternateResultAtTypesPackageJson,
|
||||
getFsContentsForAlternateResult,
|
||||
getFsContentsForAlternateResultDts,
|
||||
getFsContentsForAlternateResultPackageJson,
|
||||
} from "../helpers/alternateResult";
|
||||
import {
|
||||
verifyTsc,
|
||||
} from "../helpers/tsc";
|
||||
@@ -14,13 +14,13 @@ import {
|
||||
describe("unittests:: tsc:: moduleResolution::", () => {
|
||||
verifyTsc({
|
||||
scenario: "moduleResolution",
|
||||
subScenario: "node10Result",
|
||||
fs: () => loadProjectFromFiles(getFsContentsForNode10Result()),
|
||||
subScenario: "alternateResult",
|
||||
fs: () => loadProjectFromFiles(getFsContentsForAlternateResult()),
|
||||
commandLineArgs: ["-p", "/home/src/projects/project"],
|
||||
baselinePrograms: true,
|
||||
edits: [
|
||||
{
|
||||
caption: "delete the node10Result in @types",
|
||||
caption: "delete the alternateResult in @types",
|
||||
edit: fs => fs.unlinkSync("/home/src/projects/project/node_modules/@types/bar/index.d.ts"),
|
||||
},
|
||||
{
|
||||
@@ -28,31 +28,31 @@ describe("unittests:: tsc:: moduleResolution::", () => {
|
||||
edit: fs => fs.unlinkSync("/home/src/projects/project/node_modules/foo/index.d.ts"),
|
||||
},
|
||||
{
|
||||
caption: "add the node10Result in @types",
|
||||
edit: fs => fs.writeFileSync("/home/src/projects/project/node_modules/@types/bar/index.d.ts", getFsContentsForNode10ResultDts("bar")),
|
||||
caption: "add the alternateResult in @types",
|
||||
edit: fs => fs.writeFileSync("/home/src/projects/project/node_modules/@types/bar/index.d.ts", getFsContentsForAlternateResultDts("bar")),
|
||||
},
|
||||
{
|
||||
caption: "add the ndoe10Result in package/types",
|
||||
edit: fs => fs.writeFileSync("/home/src/projects/project/node_modules/foo/index.d.ts", getFsContentsForNode10ResultDts("foo")),
|
||||
edit: fs => fs.writeFileSync("/home/src/projects/project/node_modules/foo/index.d.ts", getFsContentsForAlternateResultDts("foo")),
|
||||
},
|
||||
{
|
||||
caption: "update package.json from @types so error is fixed",
|
||||
edit: fs => fs.writeFileSync("/home/src/projects/project/node_modules/@types/bar/package.json", getFsConentsForNode10ResultAtTypesPackageJson("bar", /*addTypesCondition*/ true)),
|
||||
edit: fs => fs.writeFileSync("/home/src/projects/project/node_modules/@types/bar/package.json", getFsConentsForAlternateResultAtTypesPackageJson("bar", /*addTypesCondition*/ true)),
|
||||
},
|
||||
{
|
||||
caption: "update package.json so error is fixed",
|
||||
edit: fs => fs.writeFileSync("/home/src/projects/project/node_modules/foo/package.json", getFsContentsForNode10ResultPackageJson("foo", /*addTypes*/ true, /*addTypesCondition*/ true)),
|
||||
edit: fs => fs.writeFileSync("/home/src/projects/project/node_modules/foo/package.json", getFsContentsForAlternateResultPackageJson("foo", /*addTypes*/ true, /*addTypesCondition*/ true)),
|
||||
},
|
||||
{
|
||||
caption: "update package.json from @types so error is introduced",
|
||||
edit: fs => fs.writeFileSync("/home/src/projects/project/node_modules/@types/bar2/package.json", getFsConentsForNode10ResultAtTypesPackageJson("bar2", /*addTypesCondition*/ false)),
|
||||
edit: fs => fs.writeFileSync("/home/src/projects/project/node_modules/@types/bar2/package.json", getFsConentsForAlternateResultAtTypesPackageJson("bar2", /*addTypesCondition*/ false)),
|
||||
},
|
||||
{
|
||||
caption: "update package.json so error is introduced",
|
||||
edit: fs => fs.writeFileSync("/home/src/projects/project/node_modules/foo2/package.json", getFsContentsForNode10ResultPackageJson("foo2", /*addTypes*/ true, /*addTypesCondition*/ false)),
|
||||
edit: fs => fs.writeFileSync("/home/src/projects/project/node_modules/foo2/package.json", getFsContentsForAlternateResultPackageJson("foo2", /*addTypes*/ true, /*addTypesCondition*/ false)),
|
||||
},
|
||||
{
|
||||
caption: "delete the node10Result in @types",
|
||||
caption: "delete the alternateResult in @types",
|
||||
edit: fs => fs.unlinkSync("/home/src/projects/project/node_modules/@types/bar2/index.d.ts"),
|
||||
},
|
||||
{
|
||||
@@ -60,12 +60,12 @@ describe("unittests:: tsc:: moduleResolution::", () => {
|
||||
edit: fs => fs.unlinkSync("/home/src/projects/project/node_modules/foo2/index.d.ts"),
|
||||
},
|
||||
{
|
||||
caption: "add the node10Result in @types",
|
||||
edit: fs => fs.writeFileSync("/home/src/projects/project/node_modules/@types/bar2/index.d.ts", getFsContentsForNode10ResultDts("bar2")),
|
||||
caption: "add the alternateResult in @types",
|
||||
edit: fs => fs.writeFileSync("/home/src/projects/project/node_modules/@types/bar2/index.d.ts", getFsContentsForAlternateResultDts("bar2")),
|
||||
},
|
||||
{
|
||||
caption: "add the ndoe10Result in package/types",
|
||||
edit: fs => fs.writeFileSync("/home/src/projects/project/node_modules/foo2/index.d.ts", getFsContentsForNode10ResultDts("foo2")),
|
||||
edit: fs => fs.writeFileSync("/home/src/projects/project/node_modules/foo2/index.d.ts", getFsContentsForAlternateResultDts("foo2")),
|
||||
},
|
||||
],
|
||||
});
|
||||
|
||||
@@ -3,11 +3,11 @@ import {
|
||||
jsonToReadableText,
|
||||
} from "../helpers";
|
||||
import {
|
||||
getFsConentsForNode10ResultAtTypesPackageJson,
|
||||
getFsContentsForNode10Result,
|
||||
getFsContentsForNode10ResultDts,
|
||||
getFsContentsForNode10ResultPackageJson,
|
||||
} from "../helpers/node10Result";
|
||||
getFsConentsForAlternateResultAtTypesPackageJson,
|
||||
getFsContentsForAlternateResult,
|
||||
getFsContentsForAlternateResultDts,
|
||||
getFsContentsForAlternateResultPackageJson,
|
||||
} from "../helpers/alternateResult";
|
||||
import {
|
||||
verifyTscWatch,
|
||||
} from "../helpers/tscWatch";
|
||||
@@ -542,12 +542,12 @@ describe("unittests:: tsc-watch:: moduleResolution", () => {
|
||||
|
||||
verifyTscWatch({
|
||||
scenario: "moduleResolution",
|
||||
subScenario: "node10Result",
|
||||
sys: () => createWatchedSystem(getFsContentsForNode10Result(), { currentDirectory: "/home/src/projects/project" }),
|
||||
subScenario: "alternateResult",
|
||||
sys: () => createWatchedSystem(getFsContentsForAlternateResult(), { currentDirectory: "/home/src/projects/project" }),
|
||||
commandLineArgs: ["-w", "--extendedDiagnostics"],
|
||||
edits: [
|
||||
{
|
||||
caption: "delete the node10Result in @types",
|
||||
caption: "delete the alternateResult in @types",
|
||||
edit: sys => sys.deleteFile("/home/src/projects/project/node_modules/@types/bar/index.d.ts"),
|
||||
timeouts: sys => {
|
||||
sys.runQueuedTimeoutCallbacks();
|
||||
@@ -563,16 +563,16 @@ describe("unittests:: tsc-watch:: moduleResolution", () => {
|
||||
},
|
||||
},
|
||||
{
|
||||
caption: "add the node10Result in @types",
|
||||
edit: sys => sys.writeFile("/home/src/projects/project/node_modules/@types/bar/index.d.ts", getFsContentsForNode10ResultDts("bar")),
|
||||
caption: "add the alternateResult in @types",
|
||||
edit: sys => sys.writeFile("/home/src/projects/project/node_modules/@types/bar/index.d.ts", getFsContentsForAlternateResultDts("bar")),
|
||||
timeouts: sys => {
|
||||
sys.runQueuedTimeoutCallbacks();
|
||||
sys.runQueuedTimeoutCallbacks();
|
||||
},
|
||||
},
|
||||
{
|
||||
caption: "add the ndoe10Result in package/types",
|
||||
edit: sys => sys.writeFile("/home/src/projects/project/node_modules/foo/index.d.ts", getFsContentsForNode10ResultDts("foo")),
|
||||
caption: "add the alternateResult in package/types",
|
||||
edit: sys => sys.writeFile("/home/src/projects/project/node_modules/foo/index.d.ts", getFsContentsForAlternateResultDts("foo")),
|
||||
timeouts: sys => {
|
||||
sys.runQueuedTimeoutCallbacks();
|
||||
sys.runQueuedTimeoutCallbacks();
|
||||
@@ -580,7 +580,7 @@ describe("unittests:: tsc-watch:: moduleResolution", () => {
|
||||
},
|
||||
{
|
||||
caption: "update package.json from @types so error is fixed",
|
||||
edit: sys => sys.writeFile("/home/src/projects/project/node_modules/@types/bar/package.json", getFsConentsForNode10ResultAtTypesPackageJson("bar", /*addTypesCondition*/ true)),
|
||||
edit: sys => sys.writeFile("/home/src/projects/project/node_modules/@types/bar/package.json", getFsConentsForAlternateResultAtTypesPackageJson("bar", /*addTypesCondition*/ true)),
|
||||
timeouts: sys => {
|
||||
sys.runQueuedTimeoutCallbacks();
|
||||
sys.runQueuedTimeoutCallbacks();
|
||||
@@ -588,7 +588,7 @@ describe("unittests:: tsc-watch:: moduleResolution", () => {
|
||||
},
|
||||
{
|
||||
caption: "update package.json so error is fixed",
|
||||
edit: sys => sys.writeFile("/home/src/projects/project/node_modules/foo/package.json", getFsContentsForNode10ResultPackageJson("foo", /*addTypes*/ true, /*addTypesCondition*/ true)),
|
||||
edit: sys => sys.writeFile("/home/src/projects/project/node_modules/foo/package.json", getFsContentsForAlternateResultPackageJson("foo", /*addTypes*/ true, /*addTypesCondition*/ true)),
|
||||
timeouts: sys => {
|
||||
sys.runQueuedTimeoutCallbacks();
|
||||
sys.runQueuedTimeoutCallbacks();
|
||||
@@ -596,7 +596,7 @@ describe("unittests:: tsc-watch:: moduleResolution", () => {
|
||||
},
|
||||
{
|
||||
caption: "update package.json from @types so error is introduced",
|
||||
edit: sys => sys.writeFile("/home/src/projects/project/node_modules/@types/bar2/package.json", getFsConentsForNode10ResultAtTypesPackageJson("bar2", /*addTypesCondition*/ false)),
|
||||
edit: sys => sys.writeFile("/home/src/projects/project/node_modules/@types/bar2/package.json", getFsConentsForAlternateResultAtTypesPackageJson("bar2", /*addTypesCondition*/ false)),
|
||||
timeouts: sys => {
|
||||
sys.runQueuedTimeoutCallbacks();
|
||||
sys.runQueuedTimeoutCallbacks();
|
||||
@@ -604,14 +604,14 @@ describe("unittests:: tsc-watch:: moduleResolution", () => {
|
||||
},
|
||||
{
|
||||
caption: "update package.json so error is introduced",
|
||||
edit: sys => sys.writeFile("/home/src/projects/project/node_modules/foo2/package.json", getFsContentsForNode10ResultPackageJson("foo2", /*addTypes*/ true, /*addTypesCondition*/ false)),
|
||||
edit: sys => sys.writeFile("/home/src/projects/project/node_modules/foo2/package.json", getFsContentsForAlternateResultPackageJson("foo2", /*addTypes*/ true, /*addTypesCondition*/ false)),
|
||||
timeouts: sys => {
|
||||
sys.runQueuedTimeoutCallbacks();
|
||||
sys.runQueuedTimeoutCallbacks();
|
||||
},
|
||||
},
|
||||
{
|
||||
caption: "delete the node10Result in @types",
|
||||
caption: "delete the alternateResult in @types",
|
||||
edit: sys => sys.deleteFile("/home/src/projects/project/node_modules/@types/bar2/index.d.ts"),
|
||||
timeouts: sys => {
|
||||
sys.runQueuedTimeoutCallbacks();
|
||||
@@ -627,8 +627,8 @@ describe("unittests:: tsc-watch:: moduleResolution", () => {
|
||||
},
|
||||
},
|
||||
{
|
||||
caption: "add the node10Result in @types",
|
||||
edit: sys => sys.writeFile("/home/src/projects/project/node_modules/@types/bar2/index.d.ts", getFsContentsForNode10ResultDts("bar2")),
|
||||
caption: "add the alternateResult in @types",
|
||||
edit: sys => sys.writeFile("/home/src/projects/project/node_modules/@types/bar2/index.d.ts", getFsContentsForAlternateResultDts("bar2")),
|
||||
timeouts: sys => {
|
||||
sys.runQueuedTimeoutCallbacks();
|
||||
sys.runQueuedTimeoutCallbacks();
|
||||
@@ -636,7 +636,7 @@ describe("unittests:: tsc-watch:: moduleResolution", () => {
|
||||
},
|
||||
{
|
||||
caption: "add the ndoe10Result in package/types",
|
||||
edit: sys => sys.writeFile("/home/src/projects/project/node_modules/foo2/index.d.ts", getFsContentsForNode10ResultDts("foo2")),
|
||||
edit: sys => sys.writeFile("/home/src/projects/project/node_modules/foo2/index.d.ts", getFsContentsForAlternateResultDts("foo2")),
|
||||
timeouts: sys => {
|
||||
sys.runQueuedTimeoutCallbacks();
|
||||
sys.runQueuedTimeoutCallbacks();
|
||||
|
||||
@@ -5,15 +5,15 @@ import {
|
||||
import {
|
||||
jsonToReadableText,
|
||||
} from "../helpers";
|
||||
import {
|
||||
getFsConentsForAlternateResultAtTypesPackageJson,
|
||||
getFsContentsForAlternateResult,
|
||||
getFsContentsForAlternateResultDts,
|
||||
getFsContentsForAlternateResultPackageJson,
|
||||
} from "../helpers/alternateResult";
|
||||
import {
|
||||
libContent,
|
||||
} from "../helpers/contents";
|
||||
import {
|
||||
getFsConentsForNode10ResultAtTypesPackageJson,
|
||||
getFsContentsForNode10Result,
|
||||
getFsContentsForNode10ResultDts,
|
||||
getFsContentsForNode10ResultPackageJson,
|
||||
} from "../helpers/node10Result";
|
||||
import {
|
||||
solutionBuildWithBaseline,
|
||||
} from "../helpers/solutionBuilder";
|
||||
@@ -163,8 +163,8 @@ describe("unittests:: tsserver:: moduleResolution", () => {
|
||||
});
|
||||
});
|
||||
|
||||
it("node10Result", () => {
|
||||
const host = createServerHost(getFsContentsForNode10Result());
|
||||
it("alternateResult", () => {
|
||||
const host = createServerHost(getFsContentsForAlternateResult());
|
||||
const session = new TestSession(host);
|
||||
openFilesForSession(["/home/src/projects/project/index.mts"], session);
|
||||
verifyGetErrRequest({
|
||||
@@ -175,28 +175,28 @@ describe("unittests:: tsserver:: moduleResolution", () => {
|
||||
verifyErrors();
|
||||
host.deleteFile("/home/src/projects/project/node_modules/foo/index.d.ts");
|
||||
verifyErrors();
|
||||
host.writeFile("/home/src/projects/project/node_modules/@types/bar/index.d.ts", getFsContentsForNode10ResultDts("bar"));
|
||||
host.writeFile("/home/src/projects/project/node_modules/@types/bar/index.d.ts", getFsContentsForAlternateResultDts("bar"));
|
||||
verifyErrors();
|
||||
host.writeFile("/home/src/projects/project/node_modules/foo/index.d.ts", getFsContentsForNode10ResultDts("foo"));
|
||||
host.writeFile("/home/src/projects/project/node_modules/foo/index.d.ts", getFsContentsForAlternateResultDts("foo"));
|
||||
verifyErrors();
|
||||
host.writeFile("/home/src/projects/project/node_modules/@types/bar/package.json", getFsConentsForNode10ResultAtTypesPackageJson("bar", /*addTypesCondition*/ true));
|
||||
host.writeFile("/home/src/projects/project/node_modules/@types/bar/package.json", getFsConentsForAlternateResultAtTypesPackageJson("bar", /*addTypesCondition*/ true));
|
||||
verifyErrors();
|
||||
host.writeFile("/home/src/projects/project/node_modules/foo/package.json", getFsContentsForNode10ResultPackageJson("foo", /*addTypes*/ true, /*addTypesCondition*/ true));
|
||||
host.writeFile("/home/src/projects/project/node_modules/foo/package.json", getFsContentsForAlternateResultPackageJson("foo", /*addTypes*/ true, /*addTypesCondition*/ true));
|
||||
verifyErrors();
|
||||
host.writeFile("/home/src/projects/project/node_modules/@types/bar2/package.json", getFsConentsForNode10ResultAtTypesPackageJson("bar2", /*addTypesCondition*/ false));
|
||||
host.writeFile("/home/src/projects/project/node_modules/@types/bar2/package.json", getFsConentsForAlternateResultAtTypesPackageJson("bar2", /*addTypesCondition*/ false));
|
||||
verifyErrors();
|
||||
host.writeFile("/home/src/projects/project/node_modules/foo2/package.json", getFsContentsForNode10ResultPackageJson("foo2", /*addTypes*/ true, /*addTypesCondition*/ false));
|
||||
host.writeFile("/home/src/projects/project/node_modules/foo2/package.json", getFsContentsForAlternateResultPackageJson("foo2", /*addTypes*/ true, /*addTypesCondition*/ false));
|
||||
verifyErrors();
|
||||
host.deleteFile("/home/src/projects/project/node_modules/@types/bar2/index.d.ts");
|
||||
verifyErrors();
|
||||
host.deleteFile("/home/src/projects/project/node_modules/foo2/index.d.ts");
|
||||
verifyErrors();
|
||||
host.writeFile("/home/src/projects/project/node_modules/@types/bar2/index.d.ts", getFsContentsForNode10ResultDts("bar2"));
|
||||
host.writeFile("/home/src/projects/project/node_modules/@types/bar2/index.d.ts", getFsContentsForAlternateResultDts("bar2"));
|
||||
verifyErrors();
|
||||
host.writeFile("/home/src/projects/project/node_modules/foo2/index.d.ts", getFsContentsForNode10ResultDts("foo2"));
|
||||
host.writeFile("/home/src/projects/project/node_modules/foo2/index.d.ts", getFsContentsForAlternateResultDts("foo2"));
|
||||
verifyErrors();
|
||||
|
||||
baselineTsserverLogs("moduleResolution", "node10Result", session);
|
||||
baselineTsserverLogs("moduleResolution", "alternateResult", session);
|
||||
|
||||
function verifyErrors() {
|
||||
host.runQueuedTimeoutCallbacks();
|
||||
|
||||
@@ -43,6 +43,32 @@
|
||||
"Directory '/node_modules/normalize.css/normalize.css' does not exist, skipping all lookups in it.",
|
||||
"File '/node_modules/normalize.css/index.js' does not exist.",
|
||||
"File '/node_modules/normalize.css/index.jsx' does not exist.",
|
||||
"Resolution of non-relative name failed; trying with '--moduleResolution bundler' to see if project may need configuration update.",
|
||||
"Loading module 'normalize.css' from 'node_modules' folder, target file types: TypeScript, Declaration.",
|
||||
"Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.",
|
||||
"File '/node_modules/normalize.css/package.json' exists according to earlier cached lookups.",
|
||||
"File name '/node_modules/normalize.css' has a '.css' extension - stripping it.",
|
||||
"File '/node_modules/normalize.d.css.ts' does not exist.",
|
||||
"File '/node_modules/normalize.css.ts' does not exist.",
|
||||
"File '/node_modules/normalize.css.tsx' does not exist.",
|
||||
"File '/node_modules/normalize.css.d.ts' does not exist.",
|
||||
"'package.json' does not have a 'typings' field.",
|
||||
"'package.json' does not have a 'types' field.",
|
||||
"'package.json' has 'main' field 'normalize.css' that references '/node_modules/normalize.css/normalize.css'.",
|
||||
"File '/node_modules/normalize.css/normalize.css' exists - use it as a name resolution result.",
|
||||
"File '/node_modules/normalize.css/normalize.css' has an unsupported extension, so skipping it.",
|
||||
"Loading module as file / folder, candidate module location '/node_modules/normalize.css/normalize.css', target file types: TypeScript, Declaration.",
|
||||
"File name '/node_modules/normalize.css/normalize.css' has a '.css' extension - stripping it.",
|
||||
"File '/node_modules/normalize.css/normalize.d.css.ts' does not exist.",
|
||||
"File '/node_modules/normalize.css/normalize.css.ts' does not exist.",
|
||||
"File '/node_modules/normalize.css/normalize.css.tsx' does not exist.",
|
||||
"File '/node_modules/normalize.css/normalize.css.d.ts' does not exist.",
|
||||
"Directory '/node_modules/normalize.css/normalize.css' does not exist, skipping all lookups in it.",
|
||||
"File '/node_modules/normalize.css/index.ts' does not exist.",
|
||||
"File '/node_modules/normalize.css/index.tsx' does not exist.",
|
||||
"File '/node_modules/normalize.css/index.d.ts' does not exist.",
|
||||
"Directory '/node_modules/@types' does not exist, skipping all lookups in it.",
|
||||
"File name '/node_modules/@types/normalize.css' has a '.css' extension - stripping it.",
|
||||
"======== Module name 'normalize.css' was not resolved. ========",
|
||||
"======== Resolving module '@typescript/lib-es5' from '/.src/__lib_node_modules_lookup_lib.es5.d.ts__.ts'. ========",
|
||||
"Explicitly specified module resolution kind: 'Node10'.",
|
||||
|
||||
@@ -33,6 +33,30 @@
|
||||
"'package.json' does not have a 'main' field.",
|
||||
"File '/node_modules/foo/index.js' does not exist.",
|
||||
"File '/node_modules/foo/index.jsx' does not exist.",
|
||||
"Resolution of non-relative name failed; trying with '--moduleResolution bundler' to see if project may need configuration update.",
|
||||
"Loading module 'foo' from 'node_modules' folder, target file types: TypeScript, Declaration.",
|
||||
"Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.",
|
||||
"File '/node_modules/foo/package.json' exists according to earlier cached lookups.",
|
||||
"File '/node_modules/foo.ts' does not exist.",
|
||||
"File '/node_modules/foo.tsx' does not exist.",
|
||||
"File '/node_modules/foo.d.ts' does not exist.",
|
||||
"'package.json' does not have a 'typings' field.",
|
||||
"'package.json' has 'types' field 'foo.js' that references '/node_modules/foo/foo.js'.",
|
||||
"File '/node_modules/foo/foo.js' exists - use it as a name resolution result.",
|
||||
"File '/node_modules/foo/foo.js' has an unsupported extension, so skipping it.",
|
||||
"Loading module as file / folder, candidate module location '/node_modules/foo/foo.js', target file types: TypeScript, Declaration.",
|
||||
"File name '/node_modules/foo/foo.js' has a '.js' extension - stripping it.",
|
||||
"File '/node_modules/foo/foo.ts' does not exist.",
|
||||
"File '/node_modules/foo/foo.tsx' does not exist.",
|
||||
"File '/node_modules/foo/foo.d.ts' does not exist.",
|
||||
"File '/node_modules/foo/foo.js.ts' does not exist.",
|
||||
"File '/node_modules/foo/foo.js.tsx' does not exist.",
|
||||
"File '/node_modules/foo/foo.js.d.ts' does not exist.",
|
||||
"Directory '/node_modules/foo/foo.js' does not exist, skipping all lookups in it.",
|
||||
"File '/node_modules/foo/index.ts' does not exist.",
|
||||
"File '/node_modules/foo/index.tsx' does not exist.",
|
||||
"File '/node_modules/foo/index.d.ts' does not exist.",
|
||||
"Directory '/node_modules/@types' does not exist, skipping all lookups in it.",
|
||||
"======== Module name 'foo' was not resolved. ========",
|
||||
"======== Resolving module '@typescript/lib-es5' from '/.src/__lib_node_modules_lookup_lib.es5.d.ts__.ts'. ========",
|
||||
"Explicitly specified module resolution kind: 'Node10'.",
|
||||
|
||||
@@ -33,6 +33,30 @@
|
||||
"File '/node_modules/foo/bar.jsx' does not exist.",
|
||||
"'package.json' does not have a 'main' field.",
|
||||
"File '/node_modules/foo/bar/index.js' exists - use it as a name resolution result.",
|
||||
"Resolution of non-relative name failed; trying with '--moduleResolution bundler' to see if project may need configuration update.",
|
||||
"Loading module 'foo/bar' from 'node_modules' folder, target file types: TypeScript, Declaration.",
|
||||
"Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.",
|
||||
"File '/node_modules/foo/bar/package.json' does not exist according to earlier cached lookups.",
|
||||
"File '/node_modules/foo/package.json' exists according to earlier cached lookups.",
|
||||
"File '/node_modules/foo/bar.ts' does not exist.",
|
||||
"File '/node_modules/foo/bar.tsx' does not exist.",
|
||||
"File '/node_modules/foo/bar.d.ts' does not exist.",
|
||||
"'package.json' does not have a 'typings' field.",
|
||||
"'package.json' has 'types' field 'types.d.ts' that references '/node_modules/foo/bar/types.d.ts'.",
|
||||
"File '/node_modules/foo/bar/types.d.ts' does not exist.",
|
||||
"Loading module as file / folder, candidate module location '/node_modules/foo/bar/types.d.ts', target file types: TypeScript, Declaration.",
|
||||
"File name '/node_modules/foo/bar/types.d.ts' has a '.d.ts' extension - stripping it.",
|
||||
"File '/node_modules/foo/bar/types.ts' does not exist.",
|
||||
"File '/node_modules/foo/bar/types.tsx' does not exist.",
|
||||
"File '/node_modules/foo/bar/types.d.ts' does not exist.",
|
||||
"File '/node_modules/foo/bar/types.d.ts.ts' does not exist.",
|
||||
"File '/node_modules/foo/bar/types.d.ts.tsx' does not exist.",
|
||||
"File '/node_modules/foo/bar/types.d.ts.d.ts' does not exist.",
|
||||
"Directory '/node_modules/foo/bar/types.d.ts' does not exist, skipping all lookups in it.",
|
||||
"File '/node_modules/foo/bar/index.ts' does not exist.",
|
||||
"File '/node_modules/foo/bar/index.tsx' does not exist.",
|
||||
"File '/node_modules/foo/bar/index.d.ts' does not exist.",
|
||||
"Directory '/node_modules/@types' does not exist, skipping all lookups in it.",
|
||||
"Resolving real path for '/node_modules/foo/bar/index.js', result '/node_modules/foo/bar/index.js'.",
|
||||
"======== Module name 'foo/bar' was successfully resolved to '/node_modules/foo/bar/index.js' with Package ID 'foo/bar/index.js@1.2.3'. ========",
|
||||
"======== Resolving module '@typescript/lib-es5' from '/.src/__lib_node_modules_lookup_lib.es5.d.ts__.ts'. ========",
|
||||
|
||||
+24
@@ -33,6 +33,30 @@
|
||||
"File '/node_modules/foo/@bar.jsx' does not exist.",
|
||||
"'package.json' does not have a 'main' field.",
|
||||
"File '/node_modules/foo/@bar/index.js' exists - use it as a name resolution result.",
|
||||
"Resolution of non-relative name failed; trying with '--moduleResolution bundler' to see if project may need configuration update.",
|
||||
"Loading module 'foo/@bar' from 'node_modules' folder, target file types: TypeScript, Declaration.",
|
||||
"Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.",
|
||||
"File '/node_modules/foo/@bar/package.json' does not exist according to earlier cached lookups.",
|
||||
"File '/node_modules/foo/package.json' exists according to earlier cached lookups.",
|
||||
"File '/node_modules/foo/@bar.ts' does not exist.",
|
||||
"File '/node_modules/foo/@bar.tsx' does not exist.",
|
||||
"File '/node_modules/foo/@bar.d.ts' does not exist.",
|
||||
"'package.json' does not have a 'typings' field.",
|
||||
"'package.json' has 'types' field 'types.d.ts' that references '/node_modules/foo/@bar/types.d.ts'.",
|
||||
"File '/node_modules/foo/@bar/types.d.ts' does not exist.",
|
||||
"Loading module as file / folder, candidate module location '/node_modules/foo/@bar/types.d.ts', target file types: TypeScript, Declaration.",
|
||||
"File name '/node_modules/foo/@bar/types.d.ts' has a '.d.ts' extension - stripping it.",
|
||||
"File '/node_modules/foo/@bar/types.ts' does not exist.",
|
||||
"File '/node_modules/foo/@bar/types.tsx' does not exist.",
|
||||
"File '/node_modules/foo/@bar/types.d.ts' does not exist.",
|
||||
"File '/node_modules/foo/@bar/types.d.ts.ts' does not exist.",
|
||||
"File '/node_modules/foo/@bar/types.d.ts.tsx' does not exist.",
|
||||
"File '/node_modules/foo/@bar/types.d.ts.d.ts' does not exist.",
|
||||
"Directory '/node_modules/foo/@bar/types.d.ts' does not exist, skipping all lookups in it.",
|
||||
"File '/node_modules/foo/@bar/index.ts' does not exist.",
|
||||
"File '/node_modules/foo/@bar/index.tsx' does not exist.",
|
||||
"File '/node_modules/foo/@bar/index.d.ts' does not exist.",
|
||||
"Directory '/node_modules/@types' does not exist, skipping all lookups in it.",
|
||||
"Resolving real path for '/node_modules/foo/@bar/index.js', result '/node_modules/foo/@bar/index.js'.",
|
||||
"======== Module name 'foo/@bar' was successfully resolved to '/node_modules/foo/@bar/index.js' with Package ID 'foo/@bar/index.js@1.2.3'. ========",
|
||||
"======== Resolving module '@typescript/lib-es5' from '/.src/__lib_node_modules_lookup_lib.es5.d.ts__.ts'. ========",
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
/index.ts(1,21): error TS2307: Cannot find module 'pkg' or its corresponding type declarations.
|
||||
There are types at '/node_modules/pkg/definitely-not-index.d.ts', but this result could not be resolved under your current 'moduleResolution' setting. Consider updating to 'node16', 'nodenext', or 'bundler'.
|
||||
|
||||
|
||||
==== /node_modules/pkg/package.json (0 errors) ====
|
||||
{
|
||||
"name": "pkg",
|
||||
"version": "1.0.0",
|
||||
"exports": {
|
||||
".": "./definitely-not-index.js"
|
||||
}
|
||||
}
|
||||
|
||||
==== /node_modules/pkg/definitely-not-index.d.ts (0 errors) ====
|
||||
export {};
|
||||
|
||||
==== /index.ts (1 errors) ====
|
||||
import { pkg } from "pkg";
|
||||
~~~~~
|
||||
!!! error TS2307: Cannot find module 'pkg' or its corresponding type declarations.
|
||||
!!! error TS2307: There are types at '/node_modules/pkg/definitely-not-index.d.ts', but this result could not be resolved under your current 'moduleResolution' setting. Consider updating to 'node16', 'nodenext', or 'bundler'.
|
||||
|
||||
@@ -0,0 +1,108 @@
|
||||
[
|
||||
"======== Resolving module 'pkg' from '/index.ts'. ========",
|
||||
"Explicitly specified module resolution kind: 'Node10'.",
|
||||
"Loading module 'pkg' from 'node_modules' folder, target file types: TypeScript, Declaration.",
|
||||
"Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.",
|
||||
"Found 'package.json' at '/node_modules/pkg/package.json'.",
|
||||
"File '/node_modules/pkg.ts' does not exist.",
|
||||
"File '/node_modules/pkg.tsx' does not exist.",
|
||||
"File '/node_modules/pkg.d.ts' does not exist.",
|
||||
"'package.json' does not have a 'typesVersions' field.",
|
||||
"'package.json' does not have a 'typings' field.",
|
||||
"'package.json' does not have a 'types' field.",
|
||||
"'package.json' does not have a 'main' field.",
|
||||
"File '/node_modules/pkg/index.ts' does not exist.",
|
||||
"File '/node_modules/pkg/index.tsx' does not exist.",
|
||||
"File '/node_modules/pkg/index.d.ts' does not exist.",
|
||||
"Directory '/node_modules/@types' does not exist, skipping all lookups in it.",
|
||||
"Loading module 'pkg' from 'node_modules' folder, target file types: JavaScript.",
|
||||
"Searching all ancestor node_modules directories for fallback extensions: JavaScript.",
|
||||
"File '/node_modules/pkg/package.json' exists according to earlier cached lookups.",
|
||||
"File '/node_modules/pkg.js' does not exist.",
|
||||
"File '/node_modules/pkg.jsx' does not exist.",
|
||||
"'package.json' does not have a 'main' field.",
|
||||
"File '/node_modules/pkg/index.js' does not exist.",
|
||||
"File '/node_modules/pkg/index.jsx' does not exist.",
|
||||
"Resolution of non-relative name failed; trying with '--moduleResolution bundler' to see if project may need configuration update.",
|
||||
"Loading module 'pkg' from 'node_modules' folder, target file types: TypeScript, Declaration.",
|
||||
"Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.",
|
||||
"File '/node_modules/pkg/package.json' exists according to earlier cached lookups.",
|
||||
"Using 'exports' subpath '.' with target './definitely-not-index.js'.",
|
||||
"File name '/node_modules/pkg/definitely-not-index.js' has a '.js' extension - stripping it.",
|
||||
"File '/node_modules/pkg/definitely-not-index.ts' does not exist.",
|
||||
"File '/node_modules/pkg/definitely-not-index.tsx' does not exist.",
|
||||
"File '/node_modules/pkg/definitely-not-index.d.ts' exists - use it as a name resolution result.",
|
||||
"======== Module name 'pkg' was not resolved. ========",
|
||||
"======== Resolving module '@typescript/lib-es5' from '/.src/__lib_node_modules_lookup_lib.es5.d.ts__.ts'. ========",
|
||||
"Explicitly specified module resolution kind: 'Node10'.",
|
||||
"Loading module '@typescript/lib-es5' from 'node_modules' folder, target file types: TypeScript, Declaration.",
|
||||
"Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.",
|
||||
"Directory '/.src/node_modules' does not exist, skipping all lookups in it.",
|
||||
"Scoped package detected, looking in 'typescript__lib-es5'",
|
||||
"Directory '/node_modules/@types' does not exist, skipping all lookups in it.",
|
||||
"Scoped package detected, looking in 'typescript__lib-es5'",
|
||||
"Loading module '@typescript/lib-es5' from 'node_modules' folder, target file types: JavaScript.",
|
||||
"Searching all ancestor node_modules directories for fallback extensions: JavaScript.",
|
||||
"Directory '/.src/node_modules' does not exist, skipping all lookups in it.",
|
||||
"======== Module name '@typescript/lib-es5' was not resolved. ========",
|
||||
"======== Resolving module '@typescript/lib-decorators' from '/.src/__lib_node_modules_lookup_lib.decorators.d.ts__.ts'. ========",
|
||||
"Explicitly specified module resolution kind: 'Node10'.",
|
||||
"Loading module '@typescript/lib-decorators' from 'node_modules' folder, target file types: TypeScript, Declaration.",
|
||||
"Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.",
|
||||
"Directory '/.src/node_modules' does not exist, skipping all lookups in it.",
|
||||
"Scoped package detected, looking in 'typescript__lib-decorators'",
|
||||
"Directory '/node_modules/@types' does not exist, skipping all lookups in it.",
|
||||
"Scoped package detected, looking in 'typescript__lib-decorators'",
|
||||
"Loading module '@typescript/lib-decorators' from 'node_modules' folder, target file types: JavaScript.",
|
||||
"Searching all ancestor node_modules directories for fallback extensions: JavaScript.",
|
||||
"Directory '/.src/node_modules' does not exist, skipping all lookups in it.",
|
||||
"======== Module name '@typescript/lib-decorators' was not resolved. ========",
|
||||
"======== Resolving module '@typescript/lib-decorators/legacy' from '/.src/__lib_node_modules_lookup_lib.decorators.legacy.d.ts__.ts'. ========",
|
||||
"Explicitly specified module resolution kind: 'Node10'.",
|
||||
"Loading module '@typescript/lib-decorators/legacy' from 'node_modules' folder, target file types: TypeScript, Declaration.",
|
||||
"Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.",
|
||||
"Directory '/.src/node_modules' does not exist, skipping all lookups in it.",
|
||||
"Scoped package detected, looking in 'typescript__lib-decorators/legacy'",
|
||||
"Directory '/node_modules/@types' does not exist, skipping all lookups in it.",
|
||||
"Scoped package detected, looking in 'typescript__lib-decorators/legacy'",
|
||||
"Loading module '@typescript/lib-decorators/legacy' from 'node_modules' folder, target file types: JavaScript.",
|
||||
"Searching all ancestor node_modules directories for fallback extensions: JavaScript.",
|
||||
"Directory '/.src/node_modules' does not exist, skipping all lookups in it.",
|
||||
"======== Module name '@typescript/lib-decorators/legacy' was not resolved. ========",
|
||||
"======== Resolving module '@typescript/lib-dom' from '/.src/__lib_node_modules_lookup_lib.dom.d.ts__.ts'. ========",
|
||||
"Explicitly specified module resolution kind: 'Node10'.",
|
||||
"Loading module '@typescript/lib-dom' from 'node_modules' folder, target file types: TypeScript, Declaration.",
|
||||
"Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.",
|
||||
"Directory '/.src/node_modules' does not exist, skipping all lookups in it.",
|
||||
"Scoped package detected, looking in 'typescript__lib-dom'",
|
||||
"Directory '/node_modules/@types' does not exist, skipping all lookups in it.",
|
||||
"Scoped package detected, looking in 'typescript__lib-dom'",
|
||||
"Loading module '@typescript/lib-dom' from 'node_modules' folder, target file types: JavaScript.",
|
||||
"Searching all ancestor node_modules directories for fallback extensions: JavaScript.",
|
||||
"Directory '/.src/node_modules' does not exist, skipping all lookups in it.",
|
||||
"======== Module name '@typescript/lib-dom' was not resolved. ========",
|
||||
"======== Resolving module '@typescript/lib-webworker/importscripts' from '/.src/__lib_node_modules_lookup_lib.webworker.importscripts.d.ts__.ts'. ========",
|
||||
"Explicitly specified module resolution kind: 'Node10'.",
|
||||
"Loading module '@typescript/lib-webworker/importscripts' from 'node_modules' folder, target file types: TypeScript, Declaration.",
|
||||
"Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.",
|
||||
"Directory '/.src/node_modules' does not exist, skipping all lookups in it.",
|
||||
"Scoped package detected, looking in 'typescript__lib-webworker/importscripts'",
|
||||
"Directory '/node_modules/@types' does not exist, skipping all lookups in it.",
|
||||
"Scoped package detected, looking in 'typescript__lib-webworker/importscripts'",
|
||||
"Loading module '@typescript/lib-webworker/importscripts' from 'node_modules' folder, target file types: JavaScript.",
|
||||
"Searching all ancestor node_modules directories for fallback extensions: JavaScript.",
|
||||
"Directory '/.src/node_modules' does not exist, skipping all lookups in it.",
|
||||
"======== Module name '@typescript/lib-webworker/importscripts' was not resolved. ========",
|
||||
"======== Resolving module '@typescript/lib-scripthost' from '/.src/__lib_node_modules_lookup_lib.scripthost.d.ts__.ts'. ========",
|
||||
"Explicitly specified module resolution kind: 'Node10'.",
|
||||
"Loading module '@typescript/lib-scripthost' from 'node_modules' folder, target file types: TypeScript, Declaration.",
|
||||
"Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.",
|
||||
"Directory '/.src/node_modules' does not exist, skipping all lookups in it.",
|
||||
"Scoped package detected, looking in 'typescript__lib-scripthost'",
|
||||
"Directory '/node_modules/@types' does not exist, skipping all lookups in it.",
|
||||
"Scoped package detected, looking in 'typescript__lib-scripthost'",
|
||||
"Loading module '@typescript/lib-scripthost' from 'node_modules' folder, target file types: JavaScript.",
|
||||
"Searching all ancestor node_modules directories for fallback extensions: JavaScript.",
|
||||
"Directory '/.src/node_modules' does not exist, skipping all lookups in it.",
|
||||
"======== Module name '@typescript/lib-scripthost' was not resolved. ========"
|
||||
]
|
||||
@@ -0,0 +1,32 @@
|
||||
error TS6504: File '/node_modules/pkg/untyped.js' is a JavaScript file. Did you mean to enable the 'allowJs' option?
|
||||
The file is in the program because:
|
||||
Root file specified for compilation
|
||||
/index.ts(1,21): error TS7016: Could not find a declaration file for module 'pkg'. '/node_modules/pkg/untyped.js' implicitly has an 'any' type.
|
||||
There are types at '/node_modules/pkg/definitely-not-index.d.ts', but this result could not be resolved under your current 'moduleResolution' setting. Consider updating to 'node16', 'nodenext', or 'bundler'.
|
||||
|
||||
|
||||
!!! error TS6504: File '/node_modules/pkg/untyped.js' is a JavaScript file. Did you mean to enable the 'allowJs' option?
|
||||
!!! error TS6504: The file is in the program because:
|
||||
!!! error TS6504: Root file specified for compilation
|
||||
==== /node_modules/pkg/package.json (0 errors) ====
|
||||
{
|
||||
"name": "pkg",
|
||||
"version": "1.0.0",
|
||||
"main": "./untyped.js",
|
||||
"exports": {
|
||||
".": "./definitely-not-index.js"
|
||||
}
|
||||
}
|
||||
|
||||
==== /node_modules/pkg/untyped.js (0 errors) ====
|
||||
export {};
|
||||
|
||||
==== /node_modules/pkg/definitely-not-index.d.ts (0 errors) ====
|
||||
export {};
|
||||
|
||||
==== /index.ts (1 errors) ====
|
||||
import { pkg } from "pkg";
|
||||
~~~~~
|
||||
!!! error TS7016: Could not find a declaration file for module 'pkg'. '/node_modules/pkg/untyped.js' implicitly has an 'any' type.
|
||||
!!! error TS7016: There are types at '/node_modules/pkg/definitely-not-index.d.ts', but this result could not be resolved under your current 'moduleResolution' setting. Consider updating to 'node16', 'nodenext', or 'bundler'.
|
||||
|
||||
@@ -0,0 +1,119 @@
|
||||
[
|
||||
"======== Resolving module 'pkg' from '/index.ts'. ========",
|
||||
"Explicitly specified module resolution kind: 'Node10'.",
|
||||
"Loading module 'pkg' from 'node_modules' folder, target file types: TypeScript, Declaration.",
|
||||
"Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.",
|
||||
"Found 'package.json' at '/node_modules/pkg/package.json'.",
|
||||
"File '/node_modules/pkg.ts' does not exist.",
|
||||
"File '/node_modules/pkg.tsx' does not exist.",
|
||||
"File '/node_modules/pkg.d.ts' does not exist.",
|
||||
"'package.json' does not have a 'typesVersions' field.",
|
||||
"'package.json' does not have a 'typings' field.",
|
||||
"'package.json' does not have a 'types' field.",
|
||||
"'package.json' has 'main' field './untyped.js' that references '/node_modules/pkg/untyped.js'.",
|
||||
"File '/node_modules/pkg/untyped.js' exists - use it as a name resolution result.",
|
||||
"File '/node_modules/pkg/untyped.js' has an unsupported extension, so skipping it.",
|
||||
"Loading module as file / folder, candidate module location '/node_modules/pkg/untyped.js', target file types: TypeScript, Declaration.",
|
||||
"File name '/node_modules/pkg/untyped.js' has a '.js' extension - stripping it.",
|
||||
"File '/node_modules/pkg/untyped.ts' does not exist.",
|
||||
"File '/node_modules/pkg/untyped.tsx' does not exist.",
|
||||
"File '/node_modules/pkg/untyped.d.ts' does not exist.",
|
||||
"File '/node_modules/pkg/untyped.js.ts' does not exist.",
|
||||
"File '/node_modules/pkg/untyped.js.tsx' does not exist.",
|
||||
"File '/node_modules/pkg/untyped.js.d.ts' does not exist.",
|
||||
"Directory '/node_modules/pkg/untyped.js' does not exist, skipping all lookups in it.",
|
||||
"File '/node_modules/pkg/index.ts' does not exist.",
|
||||
"File '/node_modules/pkg/index.tsx' does not exist.",
|
||||
"File '/node_modules/pkg/index.d.ts' does not exist.",
|
||||
"Directory '/node_modules/@types' does not exist, skipping all lookups in it.",
|
||||
"Loading module 'pkg' from 'node_modules' folder, target file types: JavaScript.",
|
||||
"Searching all ancestor node_modules directories for fallback extensions: JavaScript.",
|
||||
"File '/node_modules/pkg/package.json' exists according to earlier cached lookups.",
|
||||
"File '/node_modules/pkg.js' does not exist.",
|
||||
"File '/node_modules/pkg.jsx' does not exist.",
|
||||
"'package.json' has 'main' field './untyped.js' that references '/node_modules/pkg/untyped.js'.",
|
||||
"File '/node_modules/pkg/untyped.js' exists - use it as a name resolution result.",
|
||||
"Resolution of non-relative name failed; trying with '--moduleResolution bundler' to see if project may need configuration update.",
|
||||
"Loading module 'pkg' from 'node_modules' folder, target file types: TypeScript, Declaration.",
|
||||
"Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.",
|
||||
"File '/node_modules/pkg/package.json' exists according to earlier cached lookups.",
|
||||
"Using 'exports' subpath '.' with target './definitely-not-index.js'.",
|
||||
"File name '/node_modules/pkg/definitely-not-index.js' has a '.js' extension - stripping it.",
|
||||
"File '/node_modules/pkg/definitely-not-index.ts' does not exist.",
|
||||
"File '/node_modules/pkg/definitely-not-index.tsx' does not exist.",
|
||||
"File '/node_modules/pkg/definitely-not-index.d.ts' exists - use it as a name resolution result.",
|
||||
"Resolving real path for '/node_modules/pkg/untyped.js', result '/node_modules/pkg/untyped.js'.",
|
||||
"======== Module name 'pkg' was successfully resolved to '/node_modules/pkg/untyped.js' with Package ID 'pkg/untyped.js@1.0.0'. ========",
|
||||
"======== Resolving module '@typescript/lib-es5' from '/.src/__lib_node_modules_lookup_lib.es5.d.ts__.ts'. ========",
|
||||
"Explicitly specified module resolution kind: 'Node10'.",
|
||||
"Loading module '@typescript/lib-es5' from 'node_modules' folder, target file types: TypeScript, Declaration.",
|
||||
"Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.",
|
||||
"Directory '/.src/node_modules' does not exist, skipping all lookups in it.",
|
||||
"Scoped package detected, looking in 'typescript__lib-es5'",
|
||||
"Directory '/node_modules/@types' does not exist, skipping all lookups in it.",
|
||||
"Scoped package detected, looking in 'typescript__lib-es5'",
|
||||
"Loading module '@typescript/lib-es5' from 'node_modules' folder, target file types: JavaScript.",
|
||||
"Searching all ancestor node_modules directories for fallback extensions: JavaScript.",
|
||||
"Directory '/.src/node_modules' does not exist, skipping all lookups in it.",
|
||||
"======== Module name '@typescript/lib-es5' was not resolved. ========",
|
||||
"======== Resolving module '@typescript/lib-decorators' from '/.src/__lib_node_modules_lookup_lib.decorators.d.ts__.ts'. ========",
|
||||
"Explicitly specified module resolution kind: 'Node10'.",
|
||||
"Loading module '@typescript/lib-decorators' from 'node_modules' folder, target file types: TypeScript, Declaration.",
|
||||
"Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.",
|
||||
"Directory '/.src/node_modules' does not exist, skipping all lookups in it.",
|
||||
"Scoped package detected, looking in 'typescript__lib-decorators'",
|
||||
"Directory '/node_modules/@types' does not exist, skipping all lookups in it.",
|
||||
"Scoped package detected, looking in 'typescript__lib-decorators'",
|
||||
"Loading module '@typescript/lib-decorators' from 'node_modules' folder, target file types: JavaScript.",
|
||||
"Searching all ancestor node_modules directories for fallback extensions: JavaScript.",
|
||||
"Directory '/.src/node_modules' does not exist, skipping all lookups in it.",
|
||||
"======== Module name '@typescript/lib-decorators' was not resolved. ========",
|
||||
"======== Resolving module '@typescript/lib-decorators/legacy' from '/.src/__lib_node_modules_lookup_lib.decorators.legacy.d.ts__.ts'. ========",
|
||||
"Explicitly specified module resolution kind: 'Node10'.",
|
||||
"Loading module '@typescript/lib-decorators/legacy' from 'node_modules' folder, target file types: TypeScript, Declaration.",
|
||||
"Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.",
|
||||
"Directory '/.src/node_modules' does not exist, skipping all lookups in it.",
|
||||
"Scoped package detected, looking in 'typescript__lib-decorators/legacy'",
|
||||
"Directory '/node_modules/@types' does not exist, skipping all lookups in it.",
|
||||
"Scoped package detected, looking in 'typescript__lib-decorators/legacy'",
|
||||
"Loading module '@typescript/lib-decorators/legacy' from 'node_modules' folder, target file types: JavaScript.",
|
||||
"Searching all ancestor node_modules directories for fallback extensions: JavaScript.",
|
||||
"Directory '/.src/node_modules' does not exist, skipping all lookups in it.",
|
||||
"======== Module name '@typescript/lib-decorators/legacy' was not resolved. ========",
|
||||
"======== Resolving module '@typescript/lib-dom' from '/.src/__lib_node_modules_lookup_lib.dom.d.ts__.ts'. ========",
|
||||
"Explicitly specified module resolution kind: 'Node10'.",
|
||||
"Loading module '@typescript/lib-dom' from 'node_modules' folder, target file types: TypeScript, Declaration.",
|
||||
"Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.",
|
||||
"Directory '/.src/node_modules' does not exist, skipping all lookups in it.",
|
||||
"Scoped package detected, looking in 'typescript__lib-dom'",
|
||||
"Directory '/node_modules/@types' does not exist, skipping all lookups in it.",
|
||||
"Scoped package detected, looking in 'typescript__lib-dom'",
|
||||
"Loading module '@typescript/lib-dom' from 'node_modules' folder, target file types: JavaScript.",
|
||||
"Searching all ancestor node_modules directories for fallback extensions: JavaScript.",
|
||||
"Directory '/.src/node_modules' does not exist, skipping all lookups in it.",
|
||||
"======== Module name '@typescript/lib-dom' was not resolved. ========",
|
||||
"======== Resolving module '@typescript/lib-webworker/importscripts' from '/.src/__lib_node_modules_lookup_lib.webworker.importscripts.d.ts__.ts'. ========",
|
||||
"Explicitly specified module resolution kind: 'Node10'.",
|
||||
"Loading module '@typescript/lib-webworker/importscripts' from 'node_modules' folder, target file types: TypeScript, Declaration.",
|
||||
"Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.",
|
||||
"Directory '/.src/node_modules' does not exist, skipping all lookups in it.",
|
||||
"Scoped package detected, looking in 'typescript__lib-webworker/importscripts'",
|
||||
"Directory '/node_modules/@types' does not exist, skipping all lookups in it.",
|
||||
"Scoped package detected, looking in 'typescript__lib-webworker/importscripts'",
|
||||
"Loading module '@typescript/lib-webworker/importscripts' from 'node_modules' folder, target file types: JavaScript.",
|
||||
"Searching all ancestor node_modules directories for fallback extensions: JavaScript.",
|
||||
"Directory '/.src/node_modules' does not exist, skipping all lookups in it.",
|
||||
"======== Module name '@typescript/lib-webworker/importscripts' was not resolved. ========",
|
||||
"======== Resolving module '@typescript/lib-scripthost' from '/.src/__lib_node_modules_lookup_lib.scripthost.d.ts__.ts'. ========",
|
||||
"Explicitly specified module resolution kind: 'Node10'.",
|
||||
"Loading module '@typescript/lib-scripthost' from 'node_modules' folder, target file types: TypeScript, Declaration.",
|
||||
"Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.",
|
||||
"Directory '/.src/node_modules' does not exist, skipping all lookups in it.",
|
||||
"Scoped package detected, looking in 'typescript__lib-scripthost'",
|
||||
"Directory '/node_modules/@types' does not exist, skipping all lookups in it.",
|
||||
"Scoped package detected, looking in 'typescript__lib-scripthost'",
|
||||
"Loading module '@typescript/lib-scripthost' from 'node_modules' folder, target file types: JavaScript.",
|
||||
"Searching all ancestor node_modules directories for fallback extensions: JavaScript.",
|
||||
"Directory '/.src/node_modules' does not exist, skipping all lookups in it.",
|
||||
"======== Module name '@typescript/lib-scripthost' was not resolved. ========"
|
||||
]
|
||||
@@ -30,6 +30,26 @@
|
||||
"File '/node_modules/foo/oof' does not exist.",
|
||||
"Loading module as file / folder, candidate module location '/node_modules/foo/oof', target file types: JavaScript.",
|
||||
"File '/node_modules/foo/oof.js' exists - use it as a name resolution result.",
|
||||
"Resolution of non-relative name failed; trying with '--moduleResolution bundler' to see if project may need configuration update.",
|
||||
"Loading module 'foo' from 'node_modules' folder, target file types: TypeScript, Declaration.",
|
||||
"Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.",
|
||||
"File '/node_modules/foo/package.json' exists according to earlier cached lookups.",
|
||||
"File '/node_modules/foo.ts' does not exist.",
|
||||
"File '/node_modules/foo.tsx' does not exist.",
|
||||
"File '/node_modules/foo.d.ts' does not exist.",
|
||||
"'package.json' does not have a 'typings' field.",
|
||||
"'package.json' does not have a 'types' field.",
|
||||
"'package.json' has 'main' field 'oof' that references '/node_modules/foo/oof'.",
|
||||
"File '/node_modules/foo/oof' does not exist.",
|
||||
"Loading module as file / folder, candidate module location '/node_modules/foo/oof', target file types: TypeScript, Declaration.",
|
||||
"File '/node_modules/foo/oof.ts' does not exist.",
|
||||
"File '/node_modules/foo/oof.tsx' does not exist.",
|
||||
"File '/node_modules/foo/oof.d.ts' does not exist.",
|
||||
"Directory '/node_modules/foo/oof' does not exist, skipping all lookups in it.",
|
||||
"File '/node_modules/foo/index.ts' does not exist.",
|
||||
"File '/node_modules/foo/index.tsx' does not exist.",
|
||||
"File '/node_modules/foo/index.d.ts' does not exist.",
|
||||
"Directory '/node_modules/@types' does not exist, skipping all lookups in it.",
|
||||
"Resolving real path for '/node_modules/foo/oof.js', result '/node_modules/foo/oof.js'.",
|
||||
"======== Module name 'foo' was successfully resolved to '/node_modules/foo/oof.js'. ========",
|
||||
"======== Resolving module 'bar' from '/a.ts'. ========",
|
||||
@@ -66,6 +86,31 @@
|
||||
"File '/node_modules/bar.jsx' does not exist.",
|
||||
"'package.json' has 'main' field 'rab.js' that references '/node_modules/bar/rab.js'.",
|
||||
"File '/node_modules/bar/rab.js' exists - use it as a name resolution result.",
|
||||
"Resolution of non-relative name failed; trying with '--moduleResolution bundler' to see if project may need configuration update.",
|
||||
"Loading module 'bar' from 'node_modules' folder, target file types: TypeScript, Declaration.",
|
||||
"Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.",
|
||||
"File '/node_modules/bar/package.json' exists according to earlier cached lookups.",
|
||||
"File '/node_modules/bar.ts' does not exist.",
|
||||
"File '/node_modules/bar.tsx' does not exist.",
|
||||
"File '/node_modules/bar.d.ts' does not exist.",
|
||||
"'package.json' does not have a 'typings' field.",
|
||||
"'package.json' does not have a 'types' field.",
|
||||
"'package.json' has 'main' field 'rab.js' that references '/node_modules/bar/rab.js'.",
|
||||
"File '/node_modules/bar/rab.js' exists - use it as a name resolution result.",
|
||||
"File '/node_modules/bar/rab.js' has an unsupported extension, so skipping it.",
|
||||
"Loading module as file / folder, candidate module location '/node_modules/bar/rab.js', target file types: TypeScript, Declaration.",
|
||||
"File name '/node_modules/bar/rab.js' has a '.js' extension - stripping it.",
|
||||
"File '/node_modules/bar/rab.ts' does not exist.",
|
||||
"File '/node_modules/bar/rab.tsx' does not exist.",
|
||||
"File '/node_modules/bar/rab.d.ts' does not exist.",
|
||||
"File '/node_modules/bar/rab.js.ts' does not exist.",
|
||||
"File '/node_modules/bar/rab.js.tsx' does not exist.",
|
||||
"File '/node_modules/bar/rab.js.d.ts' does not exist.",
|
||||
"Directory '/node_modules/bar/rab.js' does not exist, skipping all lookups in it.",
|
||||
"File '/node_modules/bar/index.ts' does not exist.",
|
||||
"File '/node_modules/bar/index.tsx' does not exist.",
|
||||
"File '/node_modules/bar/index.d.ts' does not exist.",
|
||||
"Directory '/node_modules/@types' does not exist, skipping all lookups in it.",
|
||||
"Resolving real path for '/node_modules/bar/rab.js', result '/node_modules/bar/rab.js'.",
|
||||
"======== Module name 'bar' was successfully resolved to '/node_modules/bar/rab.js'. ========",
|
||||
"======== Resolving module 'baz' from '/a.ts'. ========",
|
||||
@@ -103,6 +148,28 @@
|
||||
"File '/node_modules/baz/zab.js' does not exist.",
|
||||
"File '/node_modules/baz/zab.jsx' does not exist.",
|
||||
"File '/node_modules/baz/zab/index.js' exists - use it as a name resolution result.",
|
||||
"Resolution of non-relative name failed; trying with '--moduleResolution bundler' to see if project may need configuration update.",
|
||||
"Loading module 'baz' from 'node_modules' folder, target file types: TypeScript, Declaration.",
|
||||
"Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.",
|
||||
"File '/node_modules/baz/package.json' exists according to earlier cached lookups.",
|
||||
"File '/node_modules/baz.ts' does not exist.",
|
||||
"File '/node_modules/baz.tsx' does not exist.",
|
||||
"File '/node_modules/baz.d.ts' does not exist.",
|
||||
"'package.json' does not have a 'typings' field.",
|
||||
"'package.json' does not have a 'types' field.",
|
||||
"'package.json' has 'main' field 'zab' that references '/node_modules/baz/zab'.",
|
||||
"File '/node_modules/baz/zab' does not exist.",
|
||||
"Loading module as file / folder, candidate module location '/node_modules/baz/zab', target file types: TypeScript, Declaration.",
|
||||
"File '/node_modules/baz/zab.ts' does not exist.",
|
||||
"File '/node_modules/baz/zab.tsx' does not exist.",
|
||||
"File '/node_modules/baz/zab.d.ts' does not exist.",
|
||||
"File '/node_modules/baz/zab/index.ts' does not exist.",
|
||||
"File '/node_modules/baz/zab/index.tsx' does not exist.",
|
||||
"File '/node_modules/baz/zab/index.d.ts' does not exist.",
|
||||
"File '/node_modules/baz/index.ts' does not exist.",
|
||||
"File '/node_modules/baz/index.tsx' does not exist.",
|
||||
"File '/node_modules/baz/index.d.ts' does not exist.",
|
||||
"Directory '/node_modules/@types' does not exist, skipping all lookups in it.",
|
||||
"Resolving real path for '/node_modules/baz/zab/index.js', result '/node_modules/baz/zab/index.js'.",
|
||||
"======== Module name 'baz' was successfully resolved to '/node_modules/baz/zab/index.js'. ========",
|
||||
"======== Resolving module '@typescript/lib-es5' from '/__lib_node_modules_lookup_lib.es5.d.ts__.ts'. ========",
|
||||
|
||||
@@ -37,6 +37,28 @@
|
||||
"File '/node_modules/foo/oof/index.jsx' does not exist.",
|
||||
"File '/node_modules/foo/index.js' does not exist.",
|
||||
"File '/node_modules/foo/index.jsx' does not exist.",
|
||||
"Resolution of non-relative name failed; trying with '--moduleResolution bundler' to see if project may need configuration update.",
|
||||
"Loading module 'foo' from 'node_modules' folder, target file types: TypeScript, Declaration.",
|
||||
"Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.",
|
||||
"File '/node_modules/foo/package.json' exists according to earlier cached lookups.",
|
||||
"File '/node_modules/foo.ts' does not exist.",
|
||||
"File '/node_modules/foo.tsx' does not exist.",
|
||||
"File '/node_modules/foo.d.ts' does not exist.",
|
||||
"'package.json' does not have a 'typings' field.",
|
||||
"'package.json' does not have a 'types' field.",
|
||||
"'package.json' has 'main' field 'oof' that references '/node_modules/foo/oof'.",
|
||||
"File '/node_modules/foo/oof' does not exist.",
|
||||
"Loading module as file / folder, candidate module location '/node_modules/foo/oof', target file types: TypeScript, Declaration.",
|
||||
"File '/node_modules/foo/oof.ts' does not exist.",
|
||||
"File '/node_modules/foo/oof.tsx' does not exist.",
|
||||
"File '/node_modules/foo/oof.d.ts' does not exist.",
|
||||
"File '/node_modules/foo/oof/index.ts' does not exist.",
|
||||
"File '/node_modules/foo/oof/index.tsx' does not exist.",
|
||||
"File '/node_modules/foo/oof/index.d.ts' does not exist.",
|
||||
"File '/node_modules/foo/index.ts' does not exist.",
|
||||
"File '/node_modules/foo/index.tsx' does not exist.",
|
||||
"File '/node_modules/foo/index.d.ts' does not exist.",
|
||||
"Directory '/node_modules/@types' does not exist, skipping all lookups in it.",
|
||||
"======== Module name 'foo' was not resolved. ========",
|
||||
"======== Resolving module '@typescript/lib-es5' from '/__lib_node_modules_lookup_lib.es5.d.ts__.ts'. ========",
|
||||
"Explicitly specified module resolution kind: 'Node10'.",
|
||||
|
||||
+2
@@ -2,6 +2,7 @@ error TS2688: Cannot find type definition file for 'foo'.
|
||||
The file is in the program because:
|
||||
Entry point for implicit type library 'foo'
|
||||
/app.ts(1,30): error TS2307: Cannot find module 'foo' or its corresponding type declarations.
|
||||
There are types at '/node_modules/@types/foo/index.d.mts', but this result could not be resolved under your current 'moduleResolution' setting. Consider updating to 'node16', 'nodenext', or 'bundler'.
|
||||
|
||||
|
||||
!!! error TS2688: Cannot find type definition file for 'foo'.
|
||||
@@ -29,6 +30,7 @@ error TS2688: Cannot find type definition file for 'foo'.
|
||||
type Default = typeof import("foo").x;
|
||||
~~~~~
|
||||
!!! error TS2307: Cannot find module 'foo' or its corresponding type declarations.
|
||||
!!! error TS2307: There are types at '/node_modules/@types/foo/index.d.mts', but this result could not be resolved under your current 'moduleResolution' setting. Consider updating to 'node16', 'nodenext', or 'bundler'.
|
||||
type Import = typeof import("foo", { assert: { "resolution-mode": "import" } }).x;
|
||||
type Require = typeof import("foo", { assert: { "resolution-mode": "require" } }).x;
|
||||
// resolution-mode does not enforce file extension in `bundler`, just sets conditions
|
||||
|
||||
+2
@@ -2,6 +2,7 @@ error TS2688: Cannot find type definition file for 'foo'.
|
||||
The file is in the program because:
|
||||
Entry point for implicit type library 'foo'
|
||||
/app.ts(1,35): error TS2307: Cannot find module 'foo' or its corresponding type declarations.
|
||||
There are types at '/node_modules/@types/foo/index.d.mts', but this result could not be resolved under your current 'moduleResolution' setting. Consider updating to 'node16', 'nodenext', or 'bundler'.
|
||||
|
||||
|
||||
!!! error TS2688: Cannot find type definition file for 'foo'.
|
||||
@@ -29,6 +30,7 @@ error TS2688: Cannot find type definition file for 'foo'.
|
||||
import type { x as Default } from "foo";
|
||||
~~~~~
|
||||
!!! error TS2307: Cannot find module 'foo' or its corresponding type declarations.
|
||||
!!! error TS2307: There are types at '/node_modules/@types/foo/index.d.mts', but this result could not be resolved under your current 'moduleResolution' setting. Consider updating to 'node16', 'nodenext', or 'bundler'.
|
||||
import type { x as Import } from "foo" assert { "resolution-mode": "import" };
|
||||
import type { x as Require } from "foo" assert { "resolution-mode": "require" };
|
||||
type _Default = typeof Default;
|
||||
|
||||
+4
-4
@@ -462,7 +462,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
||||
|
||||
|
||||
|
||||
Change:: delete the node10Result in @types
|
||||
Change:: delete the alternateResult in @types
|
||||
Input::
|
||||
//// [/home/src/projects/project/node_modules/@types/bar/index.d.ts] unlink
|
||||
|
||||
@@ -915,7 +915,7 @@ No shapes updated in the builder::
|
||||
|
||||
|
||||
|
||||
Change:: add the node10Result in @types
|
||||
Change:: add the alternateResult in @types
|
||||
Input::
|
||||
//// [/home/src/projects/project/node_modules/@types/bar/index.d.ts]
|
||||
export declare const bar: number;
|
||||
@@ -2474,7 +2474,7 @@ Shape signatures in builder refreshed for::
|
||||
|
||||
|
||||
|
||||
Change:: delete the node10Result in @types
|
||||
Change:: delete the alternateResult in @types
|
||||
Input::
|
||||
//// [/home/src/projects/project/node_modules/@types/bar2/index.d.ts] unlink
|
||||
|
||||
@@ -2927,7 +2927,7 @@ No shapes updated in the builder::
|
||||
|
||||
|
||||
|
||||
Change:: add the node10Result in @types
|
||||
Change:: add the alternateResult in @types
|
||||
Input::
|
||||
//// [/home/src/projects/project/node_modules/@types/bar2/index.d.ts]
|
||||
export declare const bar2: number;
|
||||
+5
-5
@@ -522,7 +522,7 @@ Shape signatures in builder refreshed for::
|
||||
|
||||
exitCode:: ExitStatus.undefined
|
||||
|
||||
Change:: delete the node10Result in @types
|
||||
Change:: delete the alternateResult in @types
|
||||
|
||||
Input::
|
||||
//// [/home/src/projects/project/node_modules/@types/bar/index.d.ts] deleted
|
||||
@@ -832,7 +832,7 @@ No shapes updated in the builder::
|
||||
|
||||
exitCode:: ExitStatus.undefined
|
||||
|
||||
Change:: add the node10Result in @types
|
||||
Change:: add the alternateResult in @types
|
||||
|
||||
Input::
|
||||
//// [/home/src/projects/project/node_modules/@types/bar/index.d.ts]
|
||||
@@ -985,7 +985,7 @@ No shapes updated in the builder::
|
||||
|
||||
exitCode:: ExitStatus.undefined
|
||||
|
||||
Change:: add the ndoe10Result in package/types
|
||||
Change:: add the alternateResult in package/types
|
||||
|
||||
Input::
|
||||
//// [/home/src/projects/project/node_modules/foo/index.d.ts]
|
||||
@@ -2227,7 +2227,7 @@ Shape signatures in builder refreshed for::
|
||||
|
||||
exitCode:: ExitStatus.undefined
|
||||
|
||||
Change:: delete the node10Result in @types
|
||||
Change:: delete the alternateResult in @types
|
||||
|
||||
Input::
|
||||
//// [/home/src/projects/project/node_modules/@types/bar2/index.d.ts] deleted
|
||||
@@ -2536,7 +2536,7 @@ No shapes updated in the builder::
|
||||
|
||||
exitCode:: ExitStatus.undefined
|
||||
|
||||
Change:: add the node10Result in @types
|
||||
Change:: add the alternateResult in @types
|
||||
|
||||
Input::
|
||||
//// [/home/src/projects/project/node_modules/@types/bar2/index.d.ts]
|
||||
@@ -53,6 +53,24 @@
|
||||
"Trying substitution 'ts3.1/*', candidate module location: 'ts3.1/index'.",
|
||||
"Loading module as file / folder, candidate module location '/.src/node_modules/ext/ts3.1/other/ts3.1/index', target file types: JavaScript.",
|
||||
"Directory '/node_modules' does not exist, skipping all lookups in it.",
|
||||
"Resolution of non-relative name failed; trying with '--moduleResolution bundler' to see if project may need configuration update.",
|
||||
"Loading module 'ext/other' from 'node_modules' folder, target file types: TypeScript, Declaration.",
|
||||
"Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.",
|
||||
"File '/.src/node_modules/ext/package.json' exists according to earlier cached lookups.",
|
||||
"'package.json' has a 'typesVersions' entry '>=3.1.0-0' that matches compiler version '3.1.0-dev', looking for a pattern to match module name 'other'.",
|
||||
"Module name 'other', matched pattern '*'.",
|
||||
"Trying substitution 'ts3.1/*', candidate module location: 'ts3.1/other'.",
|
||||
"File '/.src/node_modules/ext/ts3.1/other.ts' does not exist.",
|
||||
"File '/.src/node_modules/ext/ts3.1/other.tsx' does not exist.",
|
||||
"File '/.src/node_modules/ext/ts3.1/other.d.ts' does not exist.",
|
||||
"'package.json' does not have a 'typings' field.",
|
||||
"'package.json' has 'types' field 'index' that references '/.src/node_modules/ext/ts3.1/other/index'.",
|
||||
"'package.json' has a 'typesVersions' entry '>=3.1.0-0' that matches compiler version '3.1.0-dev', looking for a pattern to match module name 'index'.",
|
||||
"Module name 'index', matched pattern '*'.",
|
||||
"Trying substitution 'ts3.1/*', candidate module location: 'ts3.1/index'.",
|
||||
"Loading module as file / folder, candidate module location '/.src/node_modules/ext/ts3.1/other/ts3.1/index', target file types: TypeScript, Declaration.",
|
||||
"Directory '/.src/node_modules/@types' does not exist, skipping all lookups in it.",
|
||||
"Directory '/node_modules' does not exist, skipping all lookups in it.",
|
||||
"======== Module name 'ext/other' was not resolved. ========",
|
||||
"======== Resolving module '@typescript/lib-esnext' from '/.src/__lib_node_modules_lookup_lib.esnext.d.ts__.ts'. ========",
|
||||
"Explicitly specified module resolution kind: 'Node10'.",
|
||||
|
||||
@@ -53,6 +53,24 @@
|
||||
"Trying substitution 'ts3.1/*', candidate module location: 'ts3.1/index'.",
|
||||
"Loading module as file / folder, candidate module location '/.src/node_modules/ext/ts3.1/other/ts3.1/index', target file types: JavaScript.",
|
||||
"Directory '/node_modules' does not exist, skipping all lookups in it.",
|
||||
"Resolution of non-relative name failed; trying with '--moduleResolution bundler' to see if project may need configuration update.",
|
||||
"Loading module 'ext/other' from 'node_modules' folder, target file types: TypeScript, Declaration.",
|
||||
"Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.",
|
||||
"File '/.src/node_modules/ext/package.json' exists according to earlier cached lookups.",
|
||||
"'package.json' has a 'typesVersions' entry '>=3.1.0-0' that matches compiler version '3.1.0-dev', looking for a pattern to match module name 'other'.",
|
||||
"Module name 'other', matched pattern '*'.",
|
||||
"Trying substitution 'ts3.1/*', candidate module location: 'ts3.1/other'.",
|
||||
"File '/.src/node_modules/ext/ts3.1/other.ts' does not exist.",
|
||||
"File '/.src/node_modules/ext/ts3.1/other.tsx' does not exist.",
|
||||
"File '/.src/node_modules/ext/ts3.1/other.d.ts' does not exist.",
|
||||
"'package.json' does not have a 'typings' field.",
|
||||
"'package.json' has 'types' field 'index' that references '/.src/node_modules/ext/ts3.1/other/index'.",
|
||||
"'package.json' has a 'typesVersions' entry '>=3.1.0-0' that matches compiler version '3.1.0-dev', looking for a pattern to match module name 'index'.",
|
||||
"Module name 'index', matched pattern '*'.",
|
||||
"Trying substitution 'ts3.1/*', candidate module location: 'ts3.1/index'.",
|
||||
"Loading module as file / folder, candidate module location '/.src/node_modules/ext/ts3.1/other/ts3.1/index', target file types: TypeScript, Declaration.",
|
||||
"Directory '/.src/node_modules/@types' does not exist, skipping all lookups in it.",
|
||||
"Directory '/node_modules' does not exist, skipping all lookups in it.",
|
||||
"======== Module name 'ext/other' was not resolved. ========",
|
||||
"======== Resolving module '@typescript/lib-esnext' from '/.src/__lib_node_modules_lookup_lib.esnext.d.ts__.ts'. ========",
|
||||
"Explicitly specified module resolution kind: 'Node10'.",
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
// @moduleResolution: node10
|
||||
// @traceResolution: true
|
||||
// @noEmit: true
|
||||
// @noTypesAndSymbols: true
|
||||
|
||||
// @Filename: /node_modules/pkg/package.json
|
||||
{
|
||||
"name": "pkg",
|
||||
"version": "1.0.0",
|
||||
"exports": {
|
||||
".": "./definitely-not-index.js"
|
||||
}
|
||||
}
|
||||
|
||||
// @Filename: /node_modules/pkg/definitely-not-index.d.ts
|
||||
export {};
|
||||
|
||||
// @Filename: /index.ts
|
||||
import { pkg } from "pkg";
|
||||
@@ -0,0 +1,24 @@
|
||||
// @moduleResolution: node10
|
||||
// @noImplicitAny: true
|
||||
// @traceResolution: true
|
||||
// @noEmit: true
|
||||
// @noTypesAndSymbols: true
|
||||
|
||||
// @Filename: /node_modules/pkg/package.json
|
||||
{
|
||||
"name": "pkg",
|
||||
"version": "1.0.0",
|
||||
"main": "./untyped.js",
|
||||
"exports": {
|
||||
".": "./definitely-not-index.js"
|
||||
}
|
||||
}
|
||||
|
||||
// @Filename: /node_modules/pkg/untyped.js
|
||||
export {};
|
||||
|
||||
// @Filename: /node_modules/pkg/definitely-not-index.d.ts
|
||||
export {};
|
||||
|
||||
// @Filename: /index.ts
|
||||
import { pkg } from "pkg";
|
||||
Reference in New Issue
Block a user