webpack TypeError: The ‘compilation‘ argument must be an instance of Compilation解决方案

最近在学习webpack   需要用到html-webpack-plugin插件时    出现以下报错

 

webpack TypeError: The ‘compilation‘ argument must be an instance of Compilation

 

解决方案:

1.卸载webpack5

npm uninstall webpack -g(卸载完注意是看一下package.json)

2.下载webpack4

npm install webpack@4.44.2 -g

 

完美解决

posted @ 2020-12-22 10:58  北梦木兮、  阅读(3249)  评论(0编辑  收藏  举报