为了账号安全,请及时绑定邮箱和手机立即绑定

安装html-webpack-plugin,引入报错

cnpm install html-webpack-plugin --save-dev

const HtmlWebpackPlugin = require('html-webpack-plugin')  报错

错误提示:

module.js:550

    throw err;

    ^

Error: Cannot find module 'webpack-sources'

    at Function.Module._resolveFilename (module.js:548:15)

    at Function.Module._load (module.js:475:25)

    at Module.require (module.js:597:17)

    at require (D:\webpack-demo\node_modules\v8-compile-cache\v8-compile-cache.js:159:20)

    at Object.<anonymous> (D:\webpack-demo\node_modules\_webpack@5.10.1@webpack\lib\javascript\CommonJsChunkFormatPlugin.js:8:26)

    at Module._compile (D:\webpack-demo\node_modules\v8-compile-cache\v8-compile-cache.js:192:30)

    at Object.Module._extensions..js (module.js:664:10)

    at Module.load (module.js:566:32)

    at tryModuleLoad (module.js:506:12)

    at Function.Module._load (module.js:498:3)


正在回答

举报

0/150
提交
取消

安装html-webpack-plugin,引入报错

我要回答 关注问题
意见反馈 帮助中心 APP下载
官方微信