Skip to content

TypeScript Declaration Files Not Resolving Properly #24

Description

@pgraca97

Package Version: 0.0.4
TypeScript Version: 5.8.3
React Version: 19.1.0
Package Manager: pnpm 10.8.1

Issue Description

TypeScript cannot find declaration files for @responsive-email/react-email when importing components from the package, despite the type definitions existing in the package.

Error Message

Could not find a declaration file for module '@responsive-email/react-email'. 
'/path/to/node_modules/@responsive-email/react-email/dist/index.mjs' implicitly has an 'any' type.
There are types at '/path/to/node_modules/@responsive-email/react-email/dist/index.d.ts', 
but this result could not be resolved when respecting package.json "exports". 
The '@responsive-email/react-email' library may need to update its package.json or typings.

Reproduction Steps

  1. Install the package: pnpm install @responsive-email/react-email
  2. Import components: import { ResponsiveRow, ResponsiveColumn } from "@responsive-email/react-email";
  3. TypeScript reports it cannot find declaration files

I've also tried:

  • Importing from subpaths: import { ResponsiveRow } from "@responsive-email/react-email/responsive-row";
  • Reinstalling the package
  • Clearing the pnpm cache with pnpm store prune

Can you please help me? I want to use the ResponsiveRow and ResponsiveColumn to create a mobile-responsive email with react.email.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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