【问题标题】:Custom webpack error during update angular from 11 to 12更新角度从 11 到 12 期间的自定义 webpack 错误
【发布时间】:2021-09-21 02:44:17
【问题描述】:

我正在尝试将我的 Angular 版本从 11.1.1 更新到 12.1.1。我收到了这个构建错误。

“CustomWebpackDevServerSchema”模式使用关键字“id”,它的支持已被弃用。使用“$id”作为架构 ID。

“BuildCustomWebpackBrowserSchema”模式使用关键字“id”,其支持已被弃用。使用“$id”作为架构 ID。

  • 角度版本:12.1.1
  • @angular-builders/custom-webpack: 11.1.1

我尝试删除 package-lock.jsonnode_modules 并重新安装,但没有成功。

我没有发现任何类似的问题。

【问题讨论】:

  • 我认为您应该将自定义 webpack 版本更新到最新版本

标签: node.js angular npm webpack


【解决方案1】:

不确定您是否对此有答案? 但这里有一个可能的解决方案。

在我们的项目中,问题是因为我们使用 cusom webpack 配置作为顺风。此问题的解决方案是确保包"@angular-builders/custom-webpack 与您的角核心版本相同。如果您使用的是 angular core 12,请安装 "@angular-builders/custom-webpack@12:

npm i -D @angular-builders/custom-webpack@12

【讨论】:

    猜你喜欢
    • 2021-08-10
    • 2021-10-26
    • 2021-02-25
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-08-12
    • 2021-06-18
    • 1970-01-01
    相关资源
    最近更新 更多