DCzajkowski / vue-emoji-picker

Very simple, yet powerful, vue emoji picker 🎉🔥🚀
MIT License
332 stars 49 forks source link

Vue ^2.6.14 Unknown custom element: <emoji-picker> #40

Closed hedgehed closed 1 year ago

hedgehed commented 2 years ago

Hi! I tried to use this component globally:


import EmojiPicker from 'vue-emoji-picker';

Vue.use(EmojiPicker);
....
new Vue({
    i18n,
    store,
    router,
    ...App
});

and got Unknown custom element: <emoji-picker> in browser.

Also I tried to use this component locally in other vue-component:

<script>

import EmojiPicker from 'vue-emoji-picker';
export default {
    name: 'MyPosts',
    comments: {
       EmojiPicker,
    },
    data () {

With same error

Maybe something broken for vue ^2.6.14 ?

DCzajkowski commented 1 year ago

This is a problem, indeed. The plugin installer was wrong. I've fixed it, but now I have another problem I cannot fix.

What I would suggest is to import the component locally. For this, you need to import like so:

// not this: import EmojiPicker from 'vue-emoji-picker';
// but this:
import { EmojiPicker } from 'vue-emoji-picker';