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

useId is not a function in Vue 3.5.13 (PrimeVue 4.3.1) #7417

Open
1 of 4 tasks
posorioc opened this issue Mar 11, 2025 · 1 comment
Open
1 of 4 tasks

useId is not a function in Vue 3.5.13 (PrimeVue 4.3.1) #7417

posorioc opened this issue Mar 11, 2025 · 1 comment
Labels
Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible

Comments

@posorioc
Copy link

Describe the bug

When using PrimeVue 4.3.1 with Vue 3.5.13, an error occurs:

TypeError: (0 , vue__WEBPACK_IMPORTED_MODULE_0__.useId) is not a function

This happens because useId was introduced in Vue 3.6, but PrimeVue is expecting it to be available in Vue 3.5.13.

Pull Request Link

No response

Reason for not contributing a PR

  • Lack of time
  • Unsure how to implement the fix/feature
  • Difficulty understanding the codebase
  • Other

Other Reason

No response

Reproducer

https://primevue.org/datatable/

Environment

  1. Install Vue 3.5.13
  2. Install PrimeVue 4.3.1
  3. Use any PrimeVue component (e.g., <Button />)
  4. Run npm run dev
  5. See the error: useId is not a function

Vue version

Vue 3.5.13

PrimeVue version

4.3.1

Node version

No response

Browser(s)

No response

Steps to reproduce the behavior

  1. Install Vue 3.5.13
  2. Install PrimeVue 4.3.1
  3. Use any PrimeVue component (e.g., <Button />)
  4. Run npm run dev
  5. See the error: useId is not a function

Expected behavior

PrimeVue should check if useId is available before calling it, or ensure it only uses features available in Vue 3.5.13.

@posorioc posorioc added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Mar 11, 2025
@mertsincan
Copy link
Member

Interesting! Please see;
https://blog.vuejs.org/posts/vue-3-5#useid

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible
Projects
None yet
Development

No branches or pull requests

2 participants