Open ds1371dani opened 3 months ago
I can confirm the issue. It oocurs on self hostet gitlab instances. @ds1371dani maybe we should test it with a private repository on official gitlab. I am currently on vacation, i could test this next week.
It seems the metadata crawls only the official npm registries but not others, so maybe it also wont work on public repository packages?
Yarn install should also look for a .yarnrc.yml and include the custom npm registry, which is not yet the case as it seems.
Given the fact that the issue only reproduces on GitLab registries, which makes it quite hard for us to recreate the environment, would it be possible for any of you to debug it further using the unminified binary?
If not, would it be possible for you to at least create a test GitLab registry that we could install a package from so that we can debug it ourselves?
I wonder if perhaps the gitlab self-hosted registry returns invalid caching headers. But as Paul said, we either need a reproduction we can run ourselves, or that you dig into it to find out where we miss something (you can run yarn set version from sources --no-minify
to install in your project an unminified yarn.js
where you can add some console.log
statements).
@paul-soporan I tried debugging as you said, inside loadPackageMetadataInfoFromNetwork > wrapNetworkRequest
the response return statusCode = 304
with an empty response.body
so it returns the cached values on the system instead of server. it seems this should be fixed in gitlab instead of yarn, any suggestions on where to create an issue?
is it possible to force yarn to receive the metadata from server every time for the time being?
Self-service
Describe the bug
this issue is the same as https://github.com/yarnpkg/berry/issues/5989.
we have a npm registry in our corporate gitlab instance (https://gitlab.****/api/v4/projects/375/packages/npm/) when i publish a new package to the repository and then try to install the new version in my project i get the following error:
this command
yarn npm info @******/utils
gives:the content of
~/.yarn/berry/metadata/npm/3fb1ad/gitlab.********/@*****-utils.json
:To reproduce
I cannot provide, as this only occurs in my company repo
Environment
Additional context
No response