1、npm install 错误gyp ERR! configure error
解决方法:删除项目下的node_modules和package-lock.json,重新安装需要的包(但是还会报错,但是已经装上了)
2、[Vue warn]: You are using the runtime-only build of Vue where the template compiler is not available. Either pre-compile the templates into render functions, or use the compiler-included build.
解决方法:将main.js文件由
// compiler
new Vue({
el: '#app',
router: router,
store: store,
template: '<App/>',
components: { App }
})
改为
//runtime
new Vue({
router,
store,
render: h => h(App)
}).$mount("#app")