1、Error:Cannot find module 'xxx'
出现这种报错的时候,说明安装包安装的不全
解决办法:
npm install xxx --save
注意:若是报错时单独安装相应的插件后还会连续出现别的安装不完善,建议直接删除文件夹node_modules
,而后再次执行npm install
2、vue.esm.js?3153:591 [Vue warn]: The computed property "errors" is already defined in data. found in ---> <CouponExample> at src\pages\websiteInner\forgetPassword.vue <Website> at src\pages\website.vue <App> at src\App.vue <Root>
解决办法:
// 使用vee-validate(会报冲突, 因为elmentui中fields属性已使用)
import VeeValidate from 'vee-validate';
const config = {
errorBagName: 'errorBags', // change if property conflicts.
fieldsBagName: 'fieldBags',
};
Vue.use(VeeValidate, config);