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

Failed to mount component: template or render function not defined. #70

Closed
ribrewguy opened this issue Feb 3, 2018 · 4 comments
Closed

Comments

@ribrewguy
Copy link

It will not load when trying to use the component from within another component.

  import Vue from 'vue';
  import Croppa from 'vue-croppa';
  ...
  Vue.use(Croppa);

  export default {
    ...
    components: {
      Croppa,
    },
    ...
@zhanziyang
Copy link
Owner

Either

Vue.use(Croppa);

or

components: {
   croppa: Croppa.component
},

Use one of the two methods.

And note that when you do:

import Croppa from 'vue-croppa';

here Croppa is a vue plugin (that can be passed to Vue.use), not a vue component. Croppa.component is the vue component. So if you choose the second method, you should use Croppa.component.

@ribrewguy
Copy link
Author

That works! Thanks for the quick response. Also, nice lib!

@xreyc
Copy link

xreyc commented May 16, 2020

Either

Vue.use(Croppa);

or

components: {
   croppa: Croppa.component
},

Use one of the two methods.

And note that when you do:

import Croppa from 'vue-croppa';

here Croppa is a vue plugin (that can be passed to Vue.use), not a vue component. Croppa.component is the vue component. So if you choose the second method, you should use Croppa.component.

It works! thanks.

@jhays89
Copy link

jhays89 commented Jul 11, 2020

This was helpful. Thank you =)

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

4 participants