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
需要插件版本号和老师一致就好了,yarn比npm会快很多012020-11-24
相似问题