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: Error while importing / using component - Could not read from file: /home/projects/hnzcsb--run/src/components/lib/inputtext/InputText #6382

Closed
andrefd17 opened this issue Apr 11, 2024 · 1 comment · Fixed by #6383, leoo1992/GeradorQRCode#23 or leoo1992/GeradorQRCode#27
Assignees
Labels
Type: Bug Issue contains a defect related to a specific component.
Milestone

Comments

@andrefd17
Copy link

Describe the bug

 VITE v5.2.8  ready in 2099 ms

  ➜  Local:   http://localhost:5173/
  ➜  Network: use --host to expose
  ➜  press h + enter to show help
✘ [ERROR] Could not read from file: /home/projects/hnzcsb--run/src/components/lib/inputtext/InputText

    node_modules/primereact/inputotp/inputotp.esm.js:6:26:
      6 │ import { InputText } from '@/components/lib/inputtext/InputText';
        ╵                           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Error: Build failed with 1 error:
node_modules/primereact/inputotp/inputotp.esm.js:6:26: ERROR: Could not read from file: /home/projects/hnzcsb--run/src/components/lib/inputtext/InputText
    at failureErrorWithLog (/home/projects/hnzcsb--run/node_modules/esbuild/lib/main.js:1641:15)
    at eval (/home/projects/hnzcsb--run/node_modules/esbuild/lib/main.js:1049:25)
    at eval (/home/projects/hnzcsb--run/node_modules/esbuild/lib/main.js:1517:9) {
  errors: [Getter/Setter],
  warnings: [Getter/Setter]
}

Reproducer

https://stackblitz.com/edit/ym3pmp?file=src%2FApp.jsx

PrimeReact version

10.6.3

React version

18.x

Language

TypeScript

Build / Runtime

Vite

Browser(s)

No response

Steps to reproduce the behavior

Dependencies:

primereact_demo@ /home/projects/ym3pmp
+-- @esbuild/linux-x64@0.20.2 extraneous
+-- @rollup/rollup-linux-x64-gnu@4.14.1 extraneous
+-- @rollup/rollup-linux-x64-musl@4.14.1 extraneous
+-- @types/react@18.2.76
+-- @vitejs/plugin-react@4.2.1
+-- primeflex@3.3.1
+-- primeicons@7.0.0
+-- primereact@10.6.3
+-- react-dom@18.2.0
+-- react-scripts@5.0.1
+-- react-transition-group@4.4.5
+-- react@18.2.0
`-- vite@5.2.8
  1. Navigate to https://primereact.org/inputotp/#basic
  2. Click on the StackBlitz shortcut
  3. Observe results
    image

Expected behavior

Importing and using the component should not cause this error on Vite.

@andrefd17 andrefd17 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 11, 2024
melloware added a commit to melloware/primereact that referenced this issue Apr 11, 2024
@melloware
Copy link
Member

Thanks PR submitted!

@melloware melloware added Type: Bug Issue contains a defect related to a specific component. 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 11, 2024
@melloware melloware self-assigned this Apr 11, 2024
@melloware melloware added this to the 10.6.4 milestone Apr 11, 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.
Projects
None yet
2 participants