Error message
_node_modules_vue_dist_vue_global_ js__WEBPACK_IMPORTED_MODULE_1___ default().createApp is not a function
There is a problem with the way Vue is introduced
The correct introduction method is
import { createApp } from 'vue';
var App = {
data() {
return {
images: [{
Picture: "img"
},
{
Picture: "img2"
}
],
}
}
}
const app = createApp(App); // 将数据添加到Vue数据绑定上
const vm = app.mount("#app"); // 将数据绑定到指定id上
Read More:
- [Solved] Vue Error: Uncaught TypeError: Vue.createApp is not a function
- [Solved] Vue Route Error: Uncaught TypeError: (0 , vue__WEBPACK_IMPORTED_MODULE_42__.defineComponent) is not a function
- [Solved] webpack Package Error: TypeError: this.getOptions is not a function style-loader
- [Solved] Failed to load plugin ‘vue‘ declared in ‘.eslintrc.js‘: createRequire is not a function
- vue.config.js build Package UglifyJsPlugin to clear console and print console.log Error: `warnings` is not a supported option
- [Solved] Vue3.2 Error: Object.fromEntries is not a function
- Vue Use scss Error: this.getOptions is not a function [How to Solve]
- [Solved] webpack Package Error: ERROR in multi ./src/main.js ./dist/bundle.js Module not found: Error: Can‘t resolv
- Vue init webpack Error: unable to verify the first certificate
- [Solved] Vue Project Error: Syntax Error: TypeError: this.getOptions is not a function
- [Solved] Syntax Error: TypeError: this.getOptions is not a function
- [Solved] Vuepress Package Error: document is not defined
- ‘webpack dev server’ is not an internal or external command, nor is it a runnable program or batch file. Solution: error in cnpm run dev:
- [Solved] Vue Project Error: Arrow function should not return assignment
- When starting Vue project: cannot find module ‘webpack cli/bin/config yargs’ error resolution
- [Solved] Vue Project Error: Error: Cannot find module ‘webpack‘ Require stack以及Error: Rule can only have one resource so
- [Solved] Vue Less error: Webpack project report expected indentation of 0 spaces but found 2
- How to Solve “Vue is not defined” Error
- [Solved] Vue Start Project Error: ValidationError: webpack Dev Server Invalid Options
- [Solved] Vue Error: template or render function not defined