Property or method is not defined on the instance but referenced during render

UI Components for Vue
Post Reply
OneMG
Posts: 7
Joined: 19 Sep 2019, 13:32

23 Jun 2020, 13:02

Using PrimeVue 2.0.0-rc.1, I get the following error in the browser (Chrome) console.
[Vue warn]: Property or method "badge" is not defined on the instance but referenced during render. Make sure that this property is reactive, either in the data option, or for class-based components, by initializing the property. See: https://vuejs.org/v2/guide/reactivity.h ... Properties.

found in

---> <Button> at node_modules/primevue/components/button/Button.vue
...
and
[Vue warn]: Property or method "inputId" is not defined on the instance but referenced during render. Make sure that this property is reactive, either in the data option, or for class-based components, by initializing the property. See: https://vuejs.org/v2/guide/reactivity.h ... Properties.

found in

---> <Dropdown> at node_modules/primevue/components/dropdown/Dropdown.vue
...

It doesn't seem to affect the basic functionality of Button or Dropdown components but does clutter the console.

cagatay.civici
Prime
Posts: 18331
Joined: 05 Jan 2009, 00:21
Location: Cybertron
Contact:

04 Jul 2020, 10:25

Strange because both are defined as props in the component. Maybe a clean npm install would help after removing of node_modules, npm cache clean.

OneMG
Posts: 7
Joined: 19 Sep 2019, 13:32

06 Jul 2020, 23:46

I'm still learning building using NPM. I did npm cache clean, which I thought was equivalent to removing the node_modules folder, but still the same results.
When looking at the source code under webpack in the browser, I saw that it was still serving an older version of the components. I ultimately resolved it by removing the node_modules/.cache folder, and it finally updated the code for the components.

Thanks for the advice

cagatay.civici
Prime
Posts: 18331
Joined: 05 Jan 2009, 00:21
Location: Cybertron
Contact:

10 Jul 2020, 14:57

Similar thing happened to me on an unrelated code, removing node_modules and a clean npm install also fixed it for me.

Post Reply

Return to “PrimeVue”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 1 guest