verdaccio: BUG: error An unexpected error occurred: Request failed 404 Not Found.
Version: 5.15.4
This happened when we are trying to change the version of a specific package. Our older package is already cached, and when verdaccio tries to get the tarball from the cache it gets 404 because of the version change.
The solution is to manually delete the folder of the package from the cache and try again. That means that Verdaccio can’t support multiple versions in the cache. This is a big blocker.
Config:
storage: /verdaccio/storage/data
plugins: /verdaccio/plugins
web:
enable: true
title: Verdaccio
url_prefix: '/'
uplinks:
npmjs:
url: https://registry.npmjs.org/
cache: true
maxage: 259200m
yarnpkg:
url: https://registry.yarnpkg.com/
cache: true
maxage: 259200m
packages:
'@*/*':
access: $all
publish: $authenticated
proxy: yarnpkg npmjs
'**':
access: $all
publish: $authenticated
proxy: yarnpkg npmjs
middlewares:
audit:
enabled: true
logs:
- {type: stdout, format: pretty, level: debug}
To support multiple version, do we have to enable this somehow in the configuration?
About this issue
- Original URL
- State: open
- Created 2 years ago
- Reactions: 4
- Comments: 23 (7 by maintainers)
Commits related to this issue
- let's try disabling the cache, and see if it's bug https://github.com/verdaccio/verdaccio/issues/3530 — committed to neon-bindings/neon-rs by deleted user 9 months ago
@juanpicado Can you prioritize this issue, since its a critical BUG and a big blocker for us and I assume for many others that are using the verdaccio as cache too?
is there any update on this issue @juanpicado
On holidays mode 😃 will back soon few days
On CI yes, pkg manager cache is useless since is discarded (not always in Jenkins you can save it between builds in the same branch). But local does not, so for reproduce mode is something to keep on mind. What value ? Well depends, the tarballs are not invalidated only the metadata (package.Json file) and the value might vary based in your our own needs, how often your devs upgrade? Do you use automation dep managers (renovate)? If is too low you pay a penalty of performance if is to high you get into 404 because verdaccio won’t download new metadata upgrades (this might be your error). Npm has 2 min by default, but for CI is to low, so 1 day or 4 days (7 is ok because weekends usually no builds happening) too would be enough to don’t get 404 but might happens for such gap of time. You need to do your own math.
Ok! Let me try this out and see if the problem persists! I will keep you updated. Thanks.
Thanks, I will try to reproduce it locally and if I confirm might be fixed on the next patch.
The BUG is that verdaccio can’t resolve the package because its missing from the cache. At first, verdaccio is creating a folder in the cache and download the package, but if the folder already exists and the requested package is a different version that the cache holds, then it returns 404. This is 100% a BUG.