When an extensionless import fails from an ES module when moduleResolution is effectively node12/nodenext, we currently issue a useless error message.
// @filename: ./foo.mts
export function foo() {
}
// @filename: ./bar.mts
import foo from "./foo";
// error: Cannot find module './foo' or its corresponding type declarations.
Instead, we should see if we managed to find any files with an extension, or at least mention that an extensionless import is likely to fail.
When an extensionless import fails from an ES module when
moduleResolutionis effectivelynode12/nodenext, we currently issue a useless error message.Instead, we should see if we managed to find any files with an extension, or at least mention that an extensionless import is likely to fail.