primefaces / primefaces/primereact
@primereact/types is not included as a dependency but is required for TypeScript support (v11 alpha 8)
Nobody has claimed this yet.
- Dominant language
- CSS
- Stars
- 8.3k
- Forks
- 1.2k
- PR merge metrics
- No merged PRs in 30d
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
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Inspect primereact/package.json and the published package metadata to see how dependencies are declared for version 11.0.0-alpha.8. Check Button.props.d.ts and reproduce the installation in a React 19 project; done means @primereact/types is installed automatically and TypeScript resolves the referenced import.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react, typescript
- Domain
- build-system, frontend
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 55/100