jofftiquez / vue-croppie

Vue wrapper for croppie
https://jofftiquez.github.io/vue-croppie/
MIT License
260 stars 42 forks source link

Failing to mount #41

Closed julianvk closed 5 years ago

julianvk commented 5 years ago

Currently recieving this issue: [Vue warn]: Failed to mount component: template or render function not defined. found in ---> <VueCroppie>

Did recieve this issue first [Vue warn]: Unknown custom element: <vue-croppie> - did you register the component correctly? For recursive components, make sure to provide the "name" option. so imported VueCroppie directly on the component instead of in main.js which raised the current issue.

My Component.vue is a direct copy/past of the sample code. Have tried installing and using on two seperate projects.

Any help would be greatly appreciated

julianvk commented 5 years ago

Fixed, was to do with my setup with Vue.use()

jofftiquez commented 5 years ago

@julianvk Im glad you fixed it. Thanks for using vue-croppie

dakshshah96 commented 3 years ago

@jofftiquez Can I register the VueCroppie component locally instead of in my main.js file?

When I try to do the following:

<template>
  <!-- just an example -->
  <vue-croppie ref="croppieRef"></vue-croppie>
</template>

<script>
import VueCroppie from 'vue-croppie'
import 'croppie/croppie.css'

export default {
  name: 'MyComponent',
  components: { VueCroppie },
}
</script>

I always get this error:

[Vue warn]: Unknown custom element: <vue-croppie> - did you register the component correctly? For recursive components, make sure to provide the "name" option.

Putting VueCroppie in main.js and doing Vue.use(VueCroppie) works as expected but I'd rather lazy load this library only on the page where I need it.