vue-core-image-upload
vue-core-image-upload copied to clipboard
Error with nuxt.
In my plugin
// plugins/vue-core-image-upload.js
import Vue from 'vue'
import VueCoreImageUpload from 'vue-core-image-upload/dist/ssr'
Vue.use(VueCoreImageUpload)
And in my config
// nuxt.config.js
module.exports = {
plugins: [
{ src: '~/plugins/vue-core-image-upload', ssr: false }
]
}
And the error
Uncaught TypeError: Cannot read property 'toLowerCase' of undefined at http://127.0.0.1:3000/_nuxt/common.61dd0a600cb187905ef1.js:3819:38 at Object.isReservedTag (http://127.0.0.1:3000/_nuxt/common.61dd0a600cb187905ef1.js:8529:28) at Function.Vue.(anonymous function) [as component] (http://127.0.0.1:3000/_nuxt/common.61dd0a600cb187905ef1.js:8188:46) at Object.install (http://127.0.0.1:3000/_nuxt/app.64f374e1b1f2eb5c71e7.js:12346:11) at Function.Vue.use (http://127.0.0.1:3000/_nuxt/common.61dd0a600cb187905ef1.js:8056:22) at Object../plugins/vue-core-image-upload.js (http://127.0.0.1:3000/_nuxt/app.64f374e1b1f2eb5c71e7.js:14047:46) at __webpack_require__ (http://127.0.0.1:3000/_nuxt/manifest.8175c7b3a6b808294988.js:711:30) at fn (http://127.0.0.1:3000/_nuxt/manifest.8175c7b3a6b808294988.js:117:20) at Object../dist/index.js (http://127.0.0.1:3000/_nuxt/app.64f374e1b1f2eb5c71e7.js:1277:67) at __webpack_require__ (http://127.0.0.1:3000/_nuxt/manifest.8175c7b3a6b808294988.js:711:30)
please modify export default in vue-core-image-upload.vue:
name: 'vue-core-image-upload'
this is a bug!!!
Did you guys get this fixed? I did the same exact thing, but it generates nothing on the page, just the src that I put in like:
<vue-core-image-upload
:class="['btn', 'btn-primary']"
:crop="false"
@imageuploaded="imageuploaded"
:data="data"
:max-file-size="5242880"
url="your server url" >
</vue-core-image-upload>
But the render doesn't replace itself with the actual component.