5

I can't install a forked git repository. I want to install version #0.31.0.

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

I get the following error:

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.

Does this have to be a name for the package.json?

hong4rc
  • 3,999
  • 4
  • 21
  • 40
QJan84
  • 786
  • 3
  • 9
  • 22

1 Answers1

4

I had a similar issue, the repo I was trying to add as a dependency didn't have a version field in the package.json. Adding that fixed the issue.

fredrivett
  • 5,419
  • 3
  • 35
  • 48