Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

InputOtp: wrong .d.ts definition in package.json #6358

Closed
dvpritzbuer opened this issue Apr 9, 2024 · 0 comments · Fixed by #6361, leoo1992/GeradorQRCode#23 or leoo1992/GeradorQRCode#27
Assignees
Labels
Type: Bug Issue contains a defect related to a specific component. Typescript Issue or pull request is *only* related to TypeScript definition
Milestone

Comments

@dvpritzbuer
Copy link
Contributor

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

@dvpritzbuer dvpritzbuer added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Apr 9, 2024
@melloware melloware added Typescript Issue or pull request is *only* related to TypeScript definition and removed Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible labels Apr 9, 2024
@melloware melloware added this to the 10.6.4 milestone Apr 9, 2024
@melloware melloware assigned melloware and unassigned dvpritzbuer Apr 9, 2024
melloware added a commit to melloware/primereact that referenced this issue Apr 9, 2024
@nitrogenous nitrogenous added the Type: Bug Issue contains a defect related to a specific component. label Apr 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Issue contains a defect related to a specific component. Typescript Issue or pull request is *only* related to TypeScript definition
Projects
None yet
3 participants