Skip to content

ESM-mode default import does not resolve to old DT packages with no "types" field #49326

@andrewbranch

Description

@andrewbranch

Bug Report

Reported in DefinitelyTyped/DefinitelyTyped#60592

// @module: nodenext

// @Filename: /node_modules/@types/dedent/package.json
{ "name": "@types/dedent", "version": "1.0.0", "main": "" }

// @Filename: /node_modules/@types/dedent/index.d.ts
export {};

// @Filename: /index.mts
import dedent from "dedent";

Expected: import in index.mts resolves
Actual: Cannot find module 'dedent' or its corresponding type declarations.

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugA bug in TypeScriptDomain: Node ESMLike ES Modules, but specific to Node.js support (cts, cts, mjs, mts)

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions