403 error while installing scoped packages using yarn #2063
-
Describe the bug I am using verdaccio on a DigitalOcean instance and it seems that yarn package manager is not sending the Note that this problem only exists with yarn. It works fine with npm package manager. I suspect that the connections are closed after the initial request while installing via yarn (see the screenshot below) To Reproduce This bug can be reproduced by publishing a verdaccio instance to a digitalocean server with nginx.
Expected behavior The installation should work fine via yarn package manager. Screenshots Configuration File (cat ~/.config/verdaccio/config.yaml) Environment information ubuntu server 16.0.4 Debugging output
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 5 replies
-
Have you tried https://verdaccio.org/docs/en/cli-registry#yarn ? |
Beta Was this translation helpful? Give feedback.
-
Okay, this issue occurs when the tarball name does not match with the requested package name. For example, if you have a scoped package such Note that this issue only occurs with yarn and is likely an issue with the yarn package manager and the way it makes the requests. Thank you @juanpicado for your time on this :) |
Beta Was this translation helpful? Give feedback.
Okay, this issue occurs when the tarball name does not match with the requested package name.
For example, if you have a scoped package such
verdaccio
and then you modify a part of your logic to return with the same package when the user requests@verdaccio/verdaccio
then yarn does not send the authorization header even though you had setalways-auth=true
. In order to solve this you need to ensure that the requested package name matches with the tarball name (or at least the package name used inyarn add
command should be the same).Note that this issue only occurs with yarn and is likely an issue with the yarn package manager and the way it makes the requests.
Thank you @juanpicado for y…