index配置报错 "export 'default' (imported as 'Vue') was not found in 'vue'

来源:11-2 入口文件迁移及 webpack 配置变更方式

Chen114196

2020-11-23

【填坑】
自动生成版本太高导致报错
「package.json」
“devDependencies”: {
"@vue/cli-plugin-babel": “~4.5.0”,
"@vue/cli-plugin-router": “~4.5.0”,
"@vue/cli-plugin-vuex": “~4.5.0”,
"@vue/cli-service": “~4.5.0”,
"@vue/compiler-sfc": “^3.0.0”,
“stylus”: “^0.54.7”,
“stylus-loader”: “^3.0.2”
}
报错信息如下
WARNING Compiled with 5 warnings
warning in ./src/main.js
"export ‘default’ (imported as ‘Vue’) was not found in 'vue’
warning in ./src/main.js
"export ‘default’ (imported as ‘Vue’) was not found in 'vue’
warning in ./src/main.js
"export ‘default’ (imported as ‘Vue’) was not found in 'vue’
warning in ./src/router/index.js
"export ‘default’ (imported as ‘Vue’) was not found in 'vue’
warning in ./src/store/index.js
"export ‘default’ (imported as ‘Vue’) was not found in ‘vue’

写回答

1回答

Chen114196

提问者

2020-11-23

//img.mukewang.com/szimg/5fbb6d7709fd61c707550527.jpg
需要插件版本号和老师一致就好了,yarn比npm会快很多

0
1
Dell
感谢同学回答
2020-11-24
共1条回复

Vue2.5-2.6-3.0开发去哪儿网App 零基础入门到实战

课程紧跟Vue3版本迭代,企业主流版本Vue2+Vue3全掌握

10675 学习 · 8191 问题

查看课程