"export 'createVNode, mergeProps, defineComponent' was not found in 'vue'
vesper8 opened this issue · comments
Getting these warnings on a project with Vue 2
warning in ./node_modules/vue-content-loader/dist/vue-content-loader.es.js
"export 'createVNode' was not found in 'vue'
warning in ./node_modules/vue-content-loader/dist/vue-content-loader.es.js
"export 'defineComponent' was not found in 'vue'
warning in ./node_modules/vue-content-loader/dist/vue-content-loader.es.js
"export 'mergeProps' was not found in 'vue'
They are just warnings not errors but still would be nice to not have them
Actually I'm also getting a fatal error:
Uncaught TypeError: Object(...) is not a function
at eval (webpack-internal:///./node_modules/vue-content-loader/dist/vue-content-loader.es.js:15)
at Module../node_modules/vue-content-loader/dist/vue-content-loader.es.js (chunk-vendors.js:9335)
at __webpack_require__ (app.js:854)
at fn (app.js:151)
at eval (webpack-internal:///./src/global/components.js:3)
at Module../src/global/components.js (app.js:2874)
at __webpack_require__ (app.js:854)
at fn (app.js:151)
at eval (webpack-internal:///./src/main.js:453)
at Module../src/main.js (app.js:2910)
I'm not even actually using ContentLoader.. I'm getting these warnings and this error simply from declaring a global component like so:
import Vue from 'vue';
import { ContentLoader } from 'vue-content-loader';
/* Global Components */
Vue.component('ContentLoader', ContentLoader);
This worked fine on version "vue-content-loader": "^0.2.3"
Since you’re saying it was working on 0.x, I’m assuming you recently updated. There was a major version bump for 1.x because support for Vue 2 was dropped, you need Vue 3 to use a version ≥ 1.x. Next time you’re doing a major update in your project, please refer to the release notes for breaking changes to avoid surprises like this.
If you’re on Vue 2, you must stay on 0.x