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

Uncaught (in promise) TypeError: Cannot read property 'value' of undefined #3

Closed
SunaPanaReloaded opened this issue Dec 23, 2020 · 7 comments

Comments

@SunaPanaReloaded
Copy link

Screenshot 2020-12-23 at 1 29 21 PM

I've followed all steps exactly as instructed, still getting this error. When I installed Multiselect a couple of days back I didn't get such errors. Today installed a fresh copy for my project and it throws this error.

@adamberecz
Copy link
Collaborator

Please send the Multiselect options you are using. Are you using Vue 2 or 3?

@SunaPanaReloaded
Copy link
Author

Please send the Multiselect options you are using. Are you using Vue 2 or 3?

I am using Vue 3.

<Multiselect v-model="mVal" :options="options" />

I have done the import as necessary. Below are screenshots.

Screenshot 2020-12-23 at 1 41 35 PM

Screenshot 2020-12-23 at 1 42 29 PM

In addition to this I am also getting a lot of warnings like below:

Screenshot 2020-12-23 at 1 43 56 PM

Screenshot 2020-12-23 at 1 44 16 PM

@adamberecz
Copy link
Collaborator

Strange, I'm not able to reproduce this, it's working fine with Vue 3 on my end. Try creating a new component containing only this:

<template>
  <div>
    <Multiselect v-model="mVal" :options="options" />
  </div>
</template>

<script>
  import Multiselect from '@vueform/multiselect'
  import '@vueform/multiselect/themes/default.css'

  export default {
    components: {
      Multiselect,
    },
    data() {
      return {
        mVal: '',
        options: ['Batman', 'Robin', 'Joker']
      }
    },
  }
</script>

Does it still throws the errors?

@SunaPanaReloaded
Copy link
Author

Strange, I'm not able to reproduce this, it's working fine with Vue 3 on my end. Try creating a new component containing only this:

<template>
  <div>
    <Multiselect v-model="mVal" :options="options" />
  </div>
</template>

<script>
  import Multiselect from '@vueform/multiselect'
  import '@vueform/multiselect/themes/default.css'

  export default {
    components: {
      Multiselect,
    },
    data() {
      return {
        mVal: '',
        options: ['Batman', 'Robin', 'Joker']
      }
    },
  }
</script>

Does it still throws the errors?

Yes, I tried creating a new component like suggested, but it still throws the same error. I am not sure how to find the error on my side, because when I remove Multiselect everything seems to be working fine.

@adamberecz
Copy link
Collaborator

adamberecz commented Dec 23, 2020

Couple of ideas:

  • remove node_modules / package-lock.json & npm install
  • try importing @vueform/multiselect/src/Multiselect.vue instead of @vueform/multiselect - does still throws the error? If yes, send a screenshot as the error message should be more detailed.
  • what exact Vue 3 version & @vueform/multiselect versions you are using? Are you within Vue CLI project?
  • if nothing works you must create a repo which reproduces the bug so I can look into it.

@SunaPanaReloaded
Copy link
Author

Couple of ideas:

  • remove node_modules / package-lock.json & npm install
  • try importing @vueform/multiselect/src/Multiselect.vue instead of @vueform/multiselect - does still throws the error? If yes, send a screenshot as the error message should be more detailed.
  • what exact Vue 3 version & @vueform/multiselect versions you are using? Are you within Vue CLI project?
  • if nothing works you must create a repo which reproduces the bug so I can look into it.

Absolutely no clue why, but when I removed node_modules and package-lock.json, then did npm install, worked!!! Thank you for your time, really appreciate it.

@adamberecz
Copy link
Collaborator

Glad it worked!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants