Не получается подключить vue-yandex-map на Nuxt 3
Всем привет, не могу долгое время решить проблему с подключением vue-yandex-map на Nuxt 3.
Вот как я его пытаюсь подключить:
<yandex-map :settings="settings">
<ymap-marker marker-id="0" :coords="coords" />
</yandex-map>
<script>
import { yandexMap, ymapMarker } from "vue-yandex-maps";
export default {
name: "ContactsPage",
data() {
return {
coords: [62.978634, 87.5062],
settings: {
apiKey: "",
lang: "ru_RU",
coordorder: "latlong",
enterprise: false,
version: "2.1",
},
};
},
components: { yandexMap, ymapMarker },
};
</script>
Вот что мне выдает в консоли:
[Vue warn]: Failed to resolve component: yandex-map 1:12:09 AM
If this is a native custom element, make sure to exclude it from component resolution via compilerOptions.isCustomElement.
[Vue warn]: Failed to resolve component: ymap-marker 1:12:09 AM
If this is a native custom element, make sure to exclude it from component resolution via compilerOptions.isCustomElement.
[Vue warn]: Non-function value encountered for default slot. Prefer function slots for better performance. 1:12:09 AM
[Vue warn]: Component <Anonymous> is missing template or render function.
В package.json у меня стоит "vue-yandex-maps": "^1.1.0"
. И на vue-2 с подключением не было никаких проблем.
Источник: Stack Overflow на русском