十里一走马

关注

compilation.templatesPlugin is not a function

十里一走马

关注

阅读 47

2022-12-23

 

ERROR Failed to compile with 1 error
TypeError: compilation.templatesPlugin is not a function

- SetVarMainTemplatePlugin.js:17 SetVarMainTemplatePlugin.apply
[Web]/[webpack]/lib/SetVarMainTemplatePlugin.js:17:15

 

原因是:

你的webpack不是最新版本

解决办法:
npm add webpack@latest



相关推荐

幸甚至哉歌以咏志

Webpack 5: The ‘compilation‘ argument must be an instance of Compilation

幸甚至哉歌以咏志 77 0 0

春意暖洋洋

Android resource compilation failed

春意暖洋洋 111 0 0

千行

java: Compilation failed: internal java compiler error

千行 108 0 0

星巢文化

AS打开项目报错:Compilation is not supported for following modules

星巢文化 74 0 0

在觉

Ns-3.35 errata --- Compilation on Python 3.10 systems

在觉 254 0 0

年夜雪

Error:java: Compilation failed: internal java compiler error

年夜雪 120 0 0

钎探穗

idea error java:compilation failed:internal java compiler error

钎探穗 11 0 0

雨鸣静声

jQuery(function(){})与(function(){})(jQuery)的区别

雨鸣静声 139 0 0

搬砖的小木匠

A plugin must either be a function or an object with an “install“ function

搬砖的小木匠 229 0 0

自由情感小屋

Exception in thread “main“ java.lang.Error: Unresolved compilation problem:

自由情感小屋 60 0 0

精彩评论(0)

0 0 举报