【问题标题】:Migration from npm to Yarn 2 PnP: ts-loader doesn't find webpack从 npm 迁移到 Yarn 2 PnP:ts-loader 找不到 webpack
【发布时间】:2021-05-01 13:22:24
【问题描述】:

我正在处理一个NestJS 项目。

到目前为止,我一直使用npm。现在我想用Zero-InstallP'n'P 迁移到Yarn 2

但是,按照迁移说明进行操作后,我收到此错误:

~/IdeaProjects/service on feature/yarn-migration ⇡3 ❯ yarn explain peer-requirements p0b548                                                                                                                                                                                                           at 17:36:06
➤ YN0000: service@workspace:. doesn't provide webpack, breaking the following requirements:

➤ YN0000: ts-loader@npm:8.0.14 [0b662] → * ✘

我该如何解决这个问题?

【问题讨论】:

    标签: node.js nestjs yarnpkg yarnpkg-v2 yarn-v2


    【解决方案1】:

    正如消息中所解释的,ts-loaderwebpack 具有对等依赖关系。因此,您必须将 webpack 添加到您的依赖项中。

    【讨论】:

      猜你喜欢
      • 2017-08-23
      • 2018-09-17
      • 1970-01-01
      • 2017-03-11
      • 1970-01-01
      • 2015-07-27
      • 1970-01-01
      • 2017-08-22
      • 1970-01-01
      相关资源
      最近更新 更多