Module build failed (from ./node_modules/eslint-loader/index.js):Error: Failed to load plugin html:

本文介绍了当遇到Node.js项目中eslint无法加载html插件的问题时的解决方法。只需要通过npm安装对应的eslint-plugin-html插件即可轻松解决问题。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

  • 问题:

Module build failed (from ./node_modules/eslint-loader/index.js):Error: Failed to load plugin html: Cannot find module ‘eslint-plugin-html’

  • 解决方法:

运行 npm install eslint-plugin-html 即可解决

截图问题如图:
在这里插入图片描述解决办法如图:
在这里插入图片描述

Error: Failed to load plugin html: Cannot find module ‘XXXXX’
运行 npm install XXXXX 即可解决.
就是缺少什么插件你安装对应插件即可。

pnpm run build > vue_demo1@0.0.0 build /Users/zhangsonglan/web/launcher_web > run-p type-check "build-only {@}" -- > vue_demo1@0.0.0 type-check /Users/zhangsonglan/web/launcher_web > vue-tsc --build --force > vue_demo1@0.0.0 build-only /Users/zhangsonglan/web/launcher_web > vite build failed to load config from /Users/zhangsonglan/web/launcher_web/vite.config.ts error during build: ReferenceError: require is not defined in ES module scope, you can use import instead at file:///Users/zhangsonglan/web/launcher_web/node_modules/.pnpm/vite-plugin-prerender@1.0.8_vite@5.4.19_@types+node@20.19.9_sass@1.89.2_/node_modules/vite-plugin-prerender/dist/index.mjs:6:21 at ModuleJob.run (node:internal/modules/esm/module_job:262:25) at async ModuleLoader.import (node:internal/modules/esm/loader:474:24) at async loadConfigFromBundledFile (file:///Users/zhangsonglan/web/launcher_web/node_modules/.pnpm/vite@5.4.19_@types+node@20.19.9_sass@1.89.2/node_modules/vite/dist/node/chunks/dep-C6uTJdX2.js:66958:15) at async loadConfigFromFile (file:///Users/zhangsonglan/web/launcher_web/node_modules/.pnpm/vite@5.4.19_@types+node@20.19.9_sass@1.89.2/node_modules/vite/dist/node/chunks/dep-C6uTJdX2.js:66799:24) at async resolveConfig (file:///Users/zhangsonglan/web/launcher_web/node_modules/.pnpm/vite@5.4.19_@types+node@20.19.9_sass@1.89.2/node_modules/vite/dist/node/chunks/dep-C6uTJdX2.js:66399:24) at async build (file:///Users/zhangsonglan/web/launcher_web/node_modules/.pnpm/vite@5.4.19_@types+node@20.19.9_sass@1.89.2/node_modules/vite/dist/node/chunks/dep-C6uTJdX2.js:65487:18) at async CAC.<anonymous> (file:///Users/zhangsonglan/web/launcher_web/node_modules/.pnpm/vite@5.4.19_@types+node@20.19.9_sass@1.89.2/node_modules/vite/dist/node/cli.js:829:5)  ELIFECYCLE  Command failed with exit code 1.  ELIFECYCLE  Command failed. ERROR: "build-only" exited with 1.  ELIFECYCLE  Command failed with exit code 1.
最新发布
08-05
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值