xinnks / xns-seek-bar

A seekable progress bar component for Vue.js

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Failed to mount component: template or render function not defined

0xmcc opened this issue · comments

commented

Hey, I don't know if this is a dumb question but I tried using this component via npm install, but I get the error

webpack-internal:///./node_modules/vue/dist/vue.runtime.esm.js:620 [Vue warn]: Failed to mount component: template or render function not defined.

found in

---> <XnsSeekBar>
       <Footer> at src/components/Footer.vue
         <Player> at src/views/Player.vue
           <App> at src/App.vue
             <Root>

In Footer.vue (and main.js), I added - what am i doing wrong?

import XnsSeekBar from 'xns-seek-bar';
Vue.use(XnsSeekBar)
...
  components: {
   // ProgressBar,
    "xns-seek-bar": XnsSeekBar
    },

@markocalvocruz The plugin has already been imported into through Vue.use(), you don't need to re-initialize it through the components object, so remove this:

components: {
   // ProgressBar,
    "xns-seek-bar": XnsSeekBar
},

And there are no dumb questions, we learn through asking questions. @markocalvocruz