Skip to content

@primereact/types is not included as a dependency but is required for TypeScript support (v11 alpha 8) #8430

@ThiagoBarbosaDev

Description

@ThiagoBarbosaDev

When installing primereact@11.0.0-alpha.8, the @primereact/types package is not installed as a dependency, but the .d.ts files in the package reference types from it.

For example, Button.props.d.ts contains:

import type { ButtonProps } from '@primereact/types/shared/button';
However, @primereact/types is not listed as a dependency in primereact/package.json, so TypeScript cannot resolve the import.

Steps to reproduce:
Create a new project with React 19
Install PrimeReact v11 alpha: npm install primereact@11.0.0-alpha.8
Try to import ButtonProps:
import type { ButtonProps } from '@primereact/types/shared/button';// Error: Cannot find module '@primereact/types/shared/button'

Expected behavior
@primereact/types should be included as a dependency in primereact package.json so it gets installed automatically.

Workaround
Manually install the types package:
npm install @primereact/types@11.0.0-alpha.8

Environment
PrimeReact version: 11.0.0-alpha.8
React version: 19.2.1
Node version: 24.x
TypeScript version: 5.9.3

Metadata

Metadata

Assignees

No one assigned

    Labels

    Status: Needs TriageIssue will be reviewed by Core Team and a relevant label will be added as soon as possible

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions