【问题标题】:yarn add not working纱线添加不起作用
【发布时间】:2018-06-29 10:03:15
【问题描述】:

我无法安装分叉的 git 存储库。我想安装 #0.31.0 版本。

yarn add https://github.com/Goldjan/material-components-web.git#v0.31.0

我收到以下错误:

C:\Users\qjan8\Websites\XXXXXX>yarn add https://github.com/Goldjan/material-components-web.git#v0.31.0
yarn add v1.7.0
[1/4] Resolving packages...
error Can't add undefined: invalid package version undefined.
info Visit https://yarnpkg.com/en/docs/cli/add for documentation about this command.

这必须是package.json 的名称吗?

【问题讨论】:

    标签: yarnpkg mdc-components


    【解决方案1】:

    我遇到了类似的问题,我试图添加为依赖项的 repo 在 package.json 中没有 version 字段。添加解决了这个问题。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2017-03-12
      • 2022-08-16
      • 2019-01-24
      • 2022-01-21
      • 2021-11-09
      • 2020-07-31
      • 2021-01-05
      • 1970-01-01
      相关资源
      最近更新 更多