sagalbot / vue-select

Everything you wish the HTML <select> element could do, wrapped up into a lightweight, extensible Vue component.
https://vue-select.org
MIT License
4.62k stars 1.33k forks source link

ambiguous indirect export: VueSelect #1819

Open mroustchev opened 4 months ago

mroustchev commented 4 months ago

Please respect maintainers time by filling in these sections. Your issue will likely be closed without this information.

Describe the bug I am getting the follwing error message ambiguous indirect export: VueSelect

This is happening after I have include import { VueSelect } from "vue-select"; in my component file and run the app again

Reproduction Link A link to a reproduction of the bug. This is a huge help.

Steps To Reproduce 1) create a new vue project 2) install the latest version with npm install vue-select@beta 3) Include the following import in the script section from HelleoWorld.vue

<script setup>
import { VueSelect } from "vue-select";  // include this import
defineProps({
  msg: {
    type: String,
    required: true
  }
})
</script>

4) Try to run tha app and you will get the error message

Expected behavior A clear and concise description of what you expected to happen.

Screenshots image image

magic-77 commented 4 months ago

@mroustchev had the same Problem with Vue 3.4. You can can solve this importing the component that way

const App = createApp(MainVueComponent);
App.component('VueSelect', VueSelect);

or locally inside component

import VueSelect from 'vue-select';

than you need to have to define "watch()" to listen for changed options