InputOtp: wrong .d.ts definition in package.json #6358
Labels
Type: Bug
Issue contains a defect related to a specific component.
Typescript
Issue or pull request is *only* related to TypeScript definition
Milestone
Describe the bug
It's not possible to import the InputOtp component within typescript projects and the page will not render when importing.
I found that the package.json has a wrong import "InputOtp.d.ts" instead of "inputotp.d.ts" within the dist folder.
But even with changing that locally I get the following error:
"ReferenceError: React is not defined
at ../../node_modules/.pnpm/primereact@10.6.3_@types[email protected][email protected][email protected]/node_modules/primereact/inputtext/inputtext.js (http://localhost:6006/node_modules/.cache/sb-vite/deps/primereact_inputotp.js?v=bff83af4:227:11)"
Seems like it's using the wrong import with inputtext.js instead of inputtext.esm.js, but have stopped my investigation here.
Reproducer
https://stackblitz.com/edit/vitejs-vite-uifupy?file=src%2FApp.tsx,package.json
PrimeReact version
10.6.3
React version
18.x
Language
TypeScript
Build / Runtime
Create React App (CRA)
Browser(s)
No response
Steps to reproduce the behavior
No response
Expected behavior
No response
The text was updated successfully, but these errors were encountered: