【问题标题】:Cannot read property 'apply' of undefined in Webpack Tapable无法读取 Webpack Tapable 中未定义的属性“应用”
【发布时间】:2018-09-25 23:52:18
【问题描述】:

我最近从 Webpack v1 升级到 v2,我收到以下错误:

TypeError: Cannot read property 'apply' of undefined
at Compiler.apply (C:\sample\node_modules\Tapable.js:375:16)

【问题讨论】:

  • 为什么不升级到 v4?
  • 我试图使用 webpack-cli migrate command 将我的配置文件迁移到 v2 兼容性。我最终会将其转换为 v4。

标签: node.js angular npm webpack webpack-2


【解决方案1】:

检查你在 webpack 的插件设置中是否有双逗号。 我遇到了这样的问题...

 extractSass, // first semi
 ,new BundleAnalyzerPlugin({ // second semi in this line
      analyzerMode: 'static'
  })

或者尝试运行yarn add extract-text-webpack-plugin@next

【讨论】:

    猜你喜欢
    • 2019-09-05
    • 2018-03-03
    • 1970-01-01
    • 1970-01-01
    • 2019-02-12
    • 2017-09-23
    • 2017-04-06
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多