Closed tony19 closed 3 years ago
Probably need to switch to yarn add github:tony19-contrib/polymer-build#dist-missing-file-handling-2
or try with the --verbose flag to see what's failing (I'm assuming a 401 or 403 in my answer above)
Indeed, the github:
prefix causes the npm
behavior I was originally expecting (an error is emitted):
$ yarn add github:Polymer/polymer-build#fake-branch-xxx
yarn add v0.22.0
[1/4] 🔍 Resolving packages...
error Couldn't find match for "fake-branch-xxx" in "appveyor-update,master,psk2,readme-es5-adapter,remove-pd,service-worker-stream,travis,unresolved-means-unresolved,wip-analyzer,wip-deps,1/head,101/head,103/head,103/merge,107/head,108/head,111/head,112/head,118/head,12/head,120/head,122/head,125/head,126/head,126/merge,127/head,128/head,130/head,131/head,132/head,134/head,135/head,136/head,14/head,141/head,144/head,145/head,15/head,151/head,154/head,156/head,157/head,158/head,158/merge,16/head,160/head,161/head,163/head,166/head,170/head,171/head,172/head,174/head,175/head,176/head,177/head,177/merge,18/head,180/head,180/merge,181/head,183/head,184/head,185/head,187/head,189/head,19/head,192/head,193/head,196/head,197/head,198/head,2/head,20/head,21/head,27/head,38/head,39/head,4/head,4/merge,40/head,40/merge,42/head,43/head,44/head,47/head,48/head,49/head,5/head,50/head,51/head,53/head,54/head,57/head,6/head,6/merge,60/head,67/head,68/head,69/head,7/head,71/head,73/head,74/head,75/head,75/merge,77/head,83/head,84/head,87/head,9/head,91/head,91/merge,92/head,94/head,98/head,99/head,v0.2.0,v0.3.0,v0.3.1,v0.3.2,v0.4.0,v0.4.1,v0.5.0,v0.6.0,v0.6.0-alpha.1,v0.6.0-alpha.2,v0.6.0-alpha.3,v0.7.0,v0.7.1,v0.8.0,v0.8.1,v0.8.2,v0.8.3,v0.8.4,v0.9.0,v0.9.1,v1.0.0,v1.1.0,v1.2.0,v1.2.1" for "https://github.com/Polymer/polymer-build.git".
info Visit https://yarnpkg.com/en/docs/cli/add for documentation about this command.
The --verbose
flag doesn't reveal any failures for the prefix-less command:
$ yarn add --verbose polymer-build#fake-branch-xxx
yarn add v0.22.0
verbose 0.905 current time: 2017-05-04T03:51:41.653Z
[1/4] 🔍 Resolving packages...
verbose 2.108 Performing "GET" request to "https://registry.yarnpkg.com/polymer-build#fake-branch-xxx".
verbose 3.107 Request "https://registry.yarnpkg.com/polymer-build#fake-branch-xxx" finished with status code 200.
...
Closing as fixed in v2
Do you want to request a feature or report a bug? Bug
What is the current behavior? When installing a GitHub branch that yarn cannot find, it installs the latest release instead of erroring out or displaying any warning.
npm
can install this branch without issue.Also, using
yarn install
after having already installed the GitHub branch withnpm
would result in the same bug (except it doesn't produce ayarn-error.log
).If the current behavior is a bug, please provide the steps to reproduce.
Install GitHub branch:
Observe the output indicates
polymer-build@0.6.0
is installed instead of the requested branch.Observe the output does not indicate a warning/error in the console, but
yarn-error.log
shows:yarn-error.log
(LONG)What is the expected behavior? Fail immediately and abort with a non-zero exit code (instead of installing the official release).
Please mention your node.js, yarn and operating system version.