Description
Do you want to request a feature or report a bug?
Bug
What is the current behavior?
I have tested this behavior using the following versions of yarn:
- 1.5.1
- 1.6.0
- 1.9.2
I receive the following output when trying to install my dependency tagged as 0.0.1
> yarn add git+ssh://[email protected]/vinnymac/myprivaterepo.git#0.0.1
yarn add v1.9.2
[1/4] 🔍 Resolving packages...
error Can't add "myprivaterepo": invalid package version undefined.
info Visit https://yarnpkg.com/en/docs/cli/add for documentation about this command.
If I try to use other tags, such as one with characters in them or non-semver compliant tags I get a slightly different message.
> yarn add git+ssh://[email protected]/vinnymac/myprivaterepo.git#v2018.07.16
yarn add v1.9.2
[1/4] 🔍 Resolving packages...
error Can't add "myprivaterepo": invalid package version "2018.07.16".
info Visit https://yarnpkg.com/en/docs/cli/add for documentation about this command.
Trying to regenerate my yarn.lock
file results in the same message above.
If I attempt to see if yarn can list my dependency using version 1.9.2
I see this
yarn list | grep myprivaterepo
├─ [email protected]
The lockfile shows my dependency as it was generated by 1.3.2
as the following
"myprivaterepo@git+ssh://[email protected]/vinnymac/myprivaterepo.git#v2018.07.16":
version "2018.7.16"
resolved "git+ssh://[email protected]/vinnymac/myprivaterepo.git#60f0759d54cc7ddf9d4c5d55a8de3bbb71cff9e7"
dependencies:
chalk "^2.4.1"
cors "^2.8.4"
express "^4.16.3"
http-proxy-middleware "^0.18.0"
inquirer "^5.2.0"
node-sass-utils "^1.1.2"
request "^2.87.0"
semver "^5.5.0"
underscore.string "^3.3.4"
url-regex "^4.1.1"
If the current behavior is a bug, please provide the steps to reproduce.
This is a private repository, otherwise I would share it with you. If you have access to private repositories you can try to create tags identical to the ones above, and see if it works the same for you. Maybe even adding the dependencies I do will help. If you have recommendations for what I can do to more easily create a reproduction, I am open to trying anything.
What is the expected behavior?
I have tested that the expected behavior functions properly using the following versions of yarn:
- 0.24.6
- 1.1.0
- 1.2.1
- 1.3.2
On these versions of yarn, it finds the package version and installs the dependencies as I would expect. The dependency is added to my yarn.lock
file and I currently am using 1.3.2
until I find another version that suites my needs.
Please mention your node.js, yarn and operating system version.
System Details
NodeJS - v8.11.1 (I've tested v7 and v6 as well)
Yarn - v1.9.2
macOS - 10.13.6
I have been able to reproduce this on more than one machine, I attempted 5 different machines, all were running 10.13 variants.
If this is a duplicate issue, I apologize as I tried to search through and see if anyone had anything similar posted, but could not find one.