primefaces / primereact

The Most Complete React UI Component Library
https://primereact.org
MIT License
7.01k stars 1.06k forks source link

InputOtp: Error while importing / using component - Could not read from file: /home/projects/hnzcsb--run/src/components/lib/inputtext/InputText #6382

Closed andrefd17 closed 7 months ago

andrefd17 commented 7 months ago

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.

melloware commented 7 months ago

Thanks PR submitted!