1***@qq.com
1***@qq.com
  • 发布:2022-05-16 10:12
  • 更新:2022-05-16 10:19
  • 阅读:2349

【报Bug】eslint-vue 报错 Cannot find module 'eslint-plugin-html'

分类:HBuilderX

产品分类: HbuilderX

PC开发环境操作系统: Windows

PC开发环境操作系统版本号: win11 21H2

HBuilderX版本号: 3.4.7

示例代码:

"devDependencies": {
"@vitejs/plugin-vue": "^2.3.3",
"@vitejs/plugin-vue-jsx": "^1.3.10",
"babel-eslint": "^10.1.0",
"eslint": "^8.15.0",
"eslint-plugin-html": "^6.2.0",
"eslint-plugin-vue": "^8.7.1",
"less": "^4.1.2",
"less-loader": "^10.2.0",
"vite": "^2.9.9"
}

操作步骤:

eslint-vue 报错Error: Failed to load plugin 'html' declared in 'BaseConfig': Cannot find module 'eslint-plugin-html'

预期结果:

eslint-vue 报错Error: Failed to load plugin 'html' declared in 'BaseConfig': Cannot find module 'eslint-plugin-html'

实际结果:

eslint-vue 报错Error: Failed to load plugin 'html' declared in 'BaseConfig': Cannot find module 'eslint-plugin-html'

bug描述:

eslint-vue 报错Error: Failed to load plugin 'html' declared in 'BaseConfig': Cannot find module 'eslint-plugin-html'

2022-05-16 10:12 负责人:无 分享
已邀请:
DCloud_HB_WDL

DCloud_HB_WDL

重新安装一下eslint-plugin-html

npm install --save eslint-plugin-html
  • 1***@qq.com (作者)

    重装过了,不行

    卸掉eslint,换成这2个版本的就好了,eslint-plugin-html也不需要装了

    "eslint": "^6.7.2",

    "eslint-plugin-vue": "^7.0.0",

    2022-05-16 10:23

该问题目前已经被锁定, 无法添加新回复