【问题标题】:Module build failed (from ./node_modules/eslint-loader/index.js): Error: Cannot find module 'eslint/lib/formatters/stylish'模块构建失败(来自 ./node_modules/eslint-loader/index.js):错误:找不到模块 'eslint/lib/formatters/stylish'
【发布时间】:2020-07-03 05:55:20
【问题描述】:

npm run serve 工作正常,突然它开始给出同样的错误。我无法理解它的根本原因以及它为什么不起作用。谁能建议如何解决这个问题?

"devDependencies": {
    "@vue/cli-plugin-babel": "^4.2.0",
    "@vue/cli-plugin-eslint": "^4.2.0",
    "@vue/cli-plugin-router": "^4.2.0",
    "@vue/cli-plugin-vuex": "^4.2.0",
    "@vue/cli-service": "^4.2.0",
    "@vue/eslint-config-prettier": "^6.0.0",
    "babel-eslint": "^10.0.3",
    "eslint": "^5.16.0",
    "eslint-plugin-prettier": "^3.1.1",
    "eslint-plugin-vue": "^6.1.2",
    "prettier": "^1.19.1",
    "sass": "^1.19.0",
    "sass-loader": "^8.0.0",
    "vue-cli-plugin-vuetify": "^2.0.5",
    "vue-template-compiler": "^2.6.11",
    "vuetify-loader": "^1.3.0"
  }

【问题讨论】:

    标签: vue.js eslint vue-cli-3 prettier eslint-loader


    【解决方案1】:

    要解决这个问题,去掉 eslint 的插件就足够了。因此,您必须删除以下行,然后再次运行您的项目。

    "@vue/cli-plugin-eslint": "^4.2.0"

    【讨论】:

    • 谢谢!解决了我的问题
    猜你喜欢
    • 2021-07-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-04-17
    • 2019-03-03
    • 2019-08-01
    • 1970-01-01
    • 2021-11-26
    相关资源
    最近更新 更多