【问题标题】:Yarn unable to add packages (both inside and outside workspaces)纱线无法添加包(工作区内外)
【发布时间】:2020-07-31 07:06:39
【问题描述】:

Yarn 无法添加包(工作区内外)

您好,我正在使用 Yarn 2,我似乎无法安装 any 软件包。我总是收到以下格式错误:

$ yarn add useful-package

➤ BR0027: useful-package@unknown can't be resolved to a satisfying range
➤ Errors happened when preparing the environment required to run this command.

我在使用 yarn 工作区的项目内部和另一个测试项目外部都进行了尝试。

这发生在我尝试的任何包和谷歌搜索我似乎无法在此处找到此错误消息的任何相关匹配项。

您认为问题可能是什么?

最好, 马特

【问题讨论】:

    标签: node.js node-modules yarnpkg yarn-workspaces yarnpkg-v2


    【解决方案1】:

    原来我遇到了与 Yarn 2 的 Node JS 版本冲突。

    确保使用最新的 Yarn (berry/2) 和节点版本 V10.19.0 或更高版本。

    我希望这对某人有帮助!

    最好, 马特

    【讨论】:

      猜你喜欢
      • 2020-07-04
      • 1970-01-01
      • 2020-08-21
      • 2018-07-18
      • 1970-01-01
      • 1970-01-01
      • 2020-09-30
      • 2019-07-13
      • 2019-04-08
      相关资源
      最近更新 更多