primereact icon indicating copy to clipboard operation
primereact copied to clipboard

IconField: Reference error React is not defined, im using vite

Open kamel996 opened this issue 1 year ago • 4 comments

Describe the bug

when i import the IconField component and use it in my component so it shows me this error

primereact_inputicon_inputicon.js?t=1715086871785&v=648092a4:120 Uncaught ReferenceError: React is not defined at node_modules/primereact/inputicon/inputicon.js (primereact_inputicon_inputicon.js?t=1715086871785&v=648092a4:120:11) at __require (chunk-UV5CTPV7.js?v=62a634b4:9:50) at primereact_inputicon_inputicon.js?t=1715086871785&v=648092a4:123:16 node_modules/primereact/inputicon/inputicon.js @ primereact_inputicon_inputicon.js?t=1715086871785&v=648092a4:120 __require @ chunk-UV5CTPV7.js?v=62a634b4:9 (anonymous) @ primereact_inputicon_inputicon.js?t=1715086871785&v=648092a4:123 Show 3 more frames Show less

Reproducer

No response

PrimeReact version

latest

React version

18.2

Language

TypeScript

Build / Runtime

React Vite

Browser(s)

No response

Steps to reproduce the behavior

No response

Expected behavior

No response

kamel996 avatar May 07 '24 13:05 kamel996

Can you provide a stackblitz link please ?

Rekl0w avatar May 07 '24 13:05 Rekl0w

https://stackblitz.com/~/github.com/kamel996/test

kamel996 avatar May 07 '24 15:05 kamel996

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

Can you look at this link ? Looks like it is working.

Rekl0w avatar May 07 '24 17:05 Rekl0w

We're unable to replicate your issue, if you are able to create a reproducer or add details please edit this issue. This issue will be closed if no activities in 20 days.

github-actions[bot] avatar May 07 '24 19:05 github-actions[bot]