Skip to content

Export maps block TypeScript types from being resolved #172

@jakebailey

Description

@jakebailey

Using a modern resolution mode (as in, not node10, which is deprecated in TS 6.0, removed in TS 7.0) for @nova/react-test-utils nets:

Could not find a declaration file for module '@nova/react-test-utils'. '/workspaces/teams-modular-packages/node_modules/@nova/react-test-utils/lib/index.mjs' implicitly has an 'any' type.
  There are types at '/workspaces/teams-modular-packages/node_modules/@nova/react-test-utils/lib/index.d.ts', but this result could not be resolved when respecting package.json "exports". The '@nova/react-test-utils' library may need to update its package.json or typings.ts(7016)

If you look at these pages, you'll see the complaints as well:

The types entry should appear first (though this is already a suspect situation, to share types between CJS and ESM).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions