-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Description
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