You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[BUG]: TypeScript Type Definitions Missing When Installing Components with pnpm #1112
When I install React Bits components using pnpm in a TypeScript project, the components and their dependencies are installed, but the required TypeScript type definitions are missing.
For example, after installing the Lanyard component, the three package is installed, but its TypeScript type definitions are not available. This results in TypeScript errors when using the component.
I expected the required type definitions for Three.js to be available automatically so that the component would work correctly in a TypeScript project without additional manual configuration.
Reproduction Link
No response
Steps to reproduce
Create a React project with TypeScript enabled.
Install a React Bits component, such as Lanyard, using pnpm.
Install the component's required dependencies.
Run the development server or check the project for TypeScript errors.
Observe that type definitions for three dependencies are missing or unavailable.
Validations
I have checked other issues to see if my issue was already reported or addressed
Hi! I looked into this and I can reproduce what's happening from the registry output.
The TypeScript variants (for example Lanyard-TS-CSS.json) only list runtime packages under dependencies, so the CLI installs three@^0.180.0 but never @types/three. three doesn't ship its own types, so a TypeScript project gets "could not find a declaration file for module 'three'" until you add the types by hand. It isn't specific to pnpm; the shadcn and jsrepo installs behave the same way.
The same gap affects the other components that import three or matter-js (BlobCursor, ColorBends, Hyperspeed, ModelViewer, FolderFloat, PaperCrumple, FallingText), in both TS variants.
Plan: have jsrepo.config.ts add the matching @types/* package to devDependencies of the TS registry items (version taken from the repo's own package.json) and regenerate those public/r/*.json files. JS variants stay untouched, and no component code changes.
I'll open a PR for this unless you'd rather handle it another way.
Activity
harshbhx commentedon Oct 23, 2026
Hi! I looked into this and I can reproduce what's happening from the registry output.
The TypeScript variants (for example
Lanyard-TS-CSS.json) only list runtime packages underdependencies, so the CLI installsthree@^0.180.0but never@types/three.threedoesn't ship its own types, so a TypeScript project gets "could not find a declaration file for module 'three'" until you add the types by hand. It isn't specific to pnpm; the shadcn and jsrepo installs behave the same way.The same gap affects the other components that import
threeormatter-js(BlobCursor, ColorBends, Hyperspeed, ModelViewer, FolderFloat, PaperCrumple, FallingText), in both TS variants.Plan: have
jsrepo.config.tsadd the matching@types/*package todevDependenciesof the TS registry items (version taken from the repo's ownpackage.json) and regenerate thosepublic/r/*.jsonfiles. JS variants stay untouched, and no component code changes.I'll open a PR for this unless you'd rather handle it another way.