TypeError: Cannot read property ‘tapAsync’ of undefined

背景:

在运行一个Vue项目时,出现了该报错信息

ERROR  Failed to compile with 1 error                                                                                                                       15:18:17
 TypeError: Cannot read property 'tapAsync' of undefined
 ExternalModuleFactoryPlugin.js:41 ExternalModuleFactoryPlugin.apply
 [yagm]/[webpack]/lib/ExternalModuleFactoryPlugin.js:41:39
 ExternalsPlugin.js:30
 [yagm]/[webpack]/lib/ExternalsPlugin.js:30:63
 Hook.js:154 SyncHook.lazyCompileHook
 [yagm]/[cli-service]/[tapable]/lib/Hook.js:154:20
 Compiler.js:541
 [yagm]/[cli-service]/[webpack]/lib/Compiler.js:541:23
 Hook.js:154 AsyncSeriesHook.lazyCompileHook
 [yagm]/[cli-service]/[tapable]/lib/Hook.js:154:20
 Compiler.js:538 Compiler.compile
 [yagm]/[cli-service]/[webpack]/lib/Compiler.js:538:28
 Compiler.js:285 Compiler.runAsChild
 [yagm]/[cli-service]/[webpack]/lib/Compiler.js:285:8
 compiler.js:75
 [yagm]/[html-webpack-plugin]/lib/compiler.js:75:19
 new Promise
 compiler.js:74 Object.compileTemplate
 [yagm]/[html-webpack-plugin]/lib/compiler.js:74:10
 index.js:71
 [yagm]/[html-webpack-plugin]/index.js:71:42
 Hook.js:154 AsyncParallelHook.lazyCompileHook
 [yagm]/[cli-service]/[tapable]/lib/Hook.js:154:20
 Compiler.js:545
 [yagm]/[cli-service]/[webpack]/lib/Compiler.js:545:20 

解决办法:

如果觉得文章有帮助到你,可以扫描以下二维码
   请本文作者 喝一杯
pay_weixin pay_weixin

发表评论

电子邮件地址不会被公开。 必填项已用*标注