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

MeterGroup: Failed to resolve import "primereact/metergroup" from "src/App.tsx". #6340

Closed
andrefd17 opened this issue Apr 8, 2024 · 10 comments · Fixed by #6355 or leoo1992/GeradorQRCode#23
Assignees
Labels
Type: Bug Issue contains a defect related to a specific component.
Milestone

Comments

@andrefd17
Copy link

Describe the bug

I was going through the Prime React docs v10.6.2 and I was checking the new MeterGroup component, however after trying to use it on my project I get this:
Failed to resolve import "primereact/metergroup" from "src/App.tsx".

So I tried using the example StackBlitz, with the same result:
image

Reproducer

https://stackblitz.com/edit/wdm3c6?file=package.json

PrimeReact version

10.6.2

React version

18.x

Language

TypeScript

Build / Runtime

Vite

Browser(s)

No response

Steps to reproduce the behavior

  1. Go to https://primereact.org/metergroup/#basic
  2. On the region that the code is displayed for the Basic Example -> Click on the StackBlitz Icon
  3. Observe Results

Expected behavior

The import should not fail to be resolved

@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 8, 2024
@melloware melloware added Resolution: Duplicate Issue has already been reported or a pull request related to same issue has already been submitted 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.3 milestone Apr 9, 2024
@melloware
Copy link
Member

Already fixed for next release

@melloware melloware closed this as not planned Won't fix, can't repro, duplicate, stale Apr 9, 2024
@gucal gucal removed this from the 10.6.3 milestone Apr 9, 2024
@melloware
Copy link
Member

10.6.3 is out if you want to try again.

@andrefd17
Copy link
Author

hey @melloware, thanks for the update, I just tried v10.6.3 and now I'm getting this error:

metergroup.esm.js:196  Uncaught ReferenceError: React is not defined
    at createLabelList2 (metergroup.esm.js:196:5)
    at Function.getJSXElement (utils.esm.js:1650:41)
    at MeterGroup2 (metergroup.esm.js:220:34)
    at renderWithHooks (react-dom.development.js:16305:18)
    at mountIndeterminateComponent (react-dom.development.js:20074:13)
    at beginWork (react-dom.development.js:21587:16)
    at HTMLUnknownElement.callCallback2 (react-dom.development.js:4164:14)
    at Object.invokeGuardedCallbackDev (react-dom.development.js:4213:16)
    at invokeGuardedCallback (react-dom.development.js:4277:31)
    at beginWork$1 (react-dom.development.js:27451:7)

https://stackblitz.com/edit/wdm3c6-u83xgr?file=package.json

@melloware
Copy link
Member

Interesting I see it too.

@melloware melloware added Type: Bug Issue contains a defect related to a specific component. and removed Resolution: Duplicate Issue has already been reported or a pull request related to same issue has already been submitted labels Apr 9, 2024
@melloware melloware added this to the 10.6.4 milestone Apr 9, 2024
melloware added a commit to melloware/primereact that referenced this issue Apr 9, 2024
@melloware melloware self-assigned this Apr 9, 2024
@melloware melloware reopened this Apr 9, 2024
@github-actions github-actions bot 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 removed 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
Copy link
Member

OK I have never seen a strange error like this and it works on the Showcase which is even stranger. I submitted a PR that I am not sure fixes it for Vite but hopefully!

@andrefd17
Copy link
Author

@melloware, thanks for looking into it and for the PR👍🏻

@jimduchek
Copy link

I have "React is not defined" as well -- willing to help track it down if the PR doesn't fix it.

@melloware
Copy link
Member

@jimduchek i am pretty sure my PR fixes it ! PrimeTek plans on doing a new release within a week.

@katnova
Copy link

katnova commented Apr 29, 2024

I was also experiencing "Uncaught ReferenceError: React is not defined" when using the MeterGroup in version 10.6.3.

Pulled down master at commit fb010b6 and used it in-place of the 10.6.3 version, which resolved the issue.

I am using Vite and Hilla (among a myriad of other things), and to be honest, if it's resolved in my dependency-nightmare of a project it's likely resolved across the board.

@melloware
Copy link
Member

Nice @katnova yep just now waiting on a release from PrimeTek!

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
5 participants