vue-loader的问题

问题描述

在尝试创建vue项目时,我遇到了vue-loader的一些问题。我开始用vue init创建一个项目。接下来,我通过运行npm install firebase并添加import firebase from "firebase";

添加了Firebase
let config = {
  apiKey: "YOUR_API_KEY",authDomain: "YOUR_PROJECT_ID.firebaseapp.com",databaseURL: "https://YOUR_PROJECT_ID.firebaseio.com",projectId: "YOUR_PROJECT_ID",storageBucket: "YOUR_PROJECT_ID.appspot.com",messagingSenderId: "YOUR_MESSAGING_SEND_ID"
};
firebase.initializeApp(config);

到我的main.js文件。 当我尝试使用npm run serve运行此程序时,出现错误“错误:找不到模块'vue-loader / package.json'”。 因此,我尝试通过npm安装vue-loader,此后又出现了另一个错误,因为我缺少@ vue / compiler-sfc。

完成此操作后,该应用程序仅工作了很短一段时间,直到尝试安装Vuetify。

我在我的main.js中添加了Vuetify,现在我收到了错误消息

错误:[VuetifyLoaderPlugin错误]找不到与vue-loader匹配的规则。 确保至少有一个使用vue-loader的根级别规则。

来自我的package.json:

"dependencies": {
    "@vue/compiler-sfc": "^3.0.0","core-js": "^3.6.5","firebase": "^7.23.0","vue": "^2.6.11","vue-loader": "^15.9.3","vue-meta": "^2.4.0","vue-router": "^3.4.6","vuetify": "^2.2.11"
  },"devDependencies": {
    "@vue/cli-plugin-babel": "^4.5.0","@vue/cli-plugin-eslint": "^4.5.0","@vue/cli-service": "^4.5.0","babel-eslint": "^10.1.0","eslint": "^6.7.2","eslint-plugin-vue": "^6.2.2","sass": "^1.19.0","sass-loader": "^8.0.0","vue-cli-plugin-vuetify": "^2.0.7","vue-template-compiler": "^2.6.11","vuetify-loader": "^1.3.0"
  },

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)

相关问答

错误1:Request method ‘DELETE‘ not supported 错误还原:...
错误1:启动docker镜像时报错:Error response from daemon:...
错误1:private field ‘xxx‘ is never assigned 按Alt...
报错如下,通过源不能下载,最后警告pip需升级版本 Requirem...