primereact icon indicating copy to clipboard operation
primereact copied to clipboard

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

Open ThiagoBarbosaDev opened this issue 1 month ago • 0 comments

When installing [email protected], 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 [email protected] 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/[email protected]

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

ThiagoBarbosaDev avatar Dec 09 '25 18:12 ThiagoBarbosaDev