Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug: dist-tag get out of sync with upstream registry #3913

Open
1 task
89ao opened this issue Jul 4, 2023 · 2 comments
Open
1 task

bug: dist-tag get out of sync with upstream registry #3913

89ao opened this issue Jul 4, 2023 · 2 comments
Assignees
Milestone

Comments

@89ao
Copy link

89ao commented Jul 4, 2023

Your Environment

  • verdaccio version: v5.21.1
  • node version [12.x.x, 14.x.x]:v12.18.4
  • package manager: [npm@7, pnpm@6, yarn@2] 6.14.6
  • os: [mac, windows@10, linux] CentOS Linux release 7.2 (Final)
  • platform: [npm, docker, helm, other] docker

Describe the bug

Recently, we found that the metadata information of the local repository is inconsistent with that of the official package.
image
This caused our users to install packages that did not meet their expectations.

After some debugging ,I found that the package.json file context is like below:

        "users": {},
        "dist-tags": {
                "latest": "3.0.0-alpha.7-for-vscode",
                "next": "3.0.0-alpha.9-for-vscode"
        },

However, the correct content should actually be:

        "dist-tags": {
                "latest": "2.8.8",
                "next": "3.0.0-alpha.12"
        },

But once I delete this package.json, the content is correct when it's automatically generated.

To Reproduce

Actually , there are absolutely no reproducible clues available.

Expected behavior

  1. How to fix all packages.json files?
  2. How to solve the problem of "syncing issue"?

Screenshots, server logs, package manager log

Configuration File (cat ~/.config/verdaccio/config.yaml)

storage: /repo/npm/verdaccio/storage
http_proxy: http://x.x.x.x:3128
https_proxy: http://x.x.x.x:3128
no_proxy: localhost,127.0.0.1
plugins: ./plugins
url_prefix: /npm/
max_body_size: 10mb

listen:
   -  0.0.0.0:4873

web:
  title: TXX-NPM

auth:
  htpasswd:
    file: ./htpasswd
    max_users: -1

uplinks:
  npmjs:
    url: https://registry.npmjs.org/
    maxage: 4m
    timeout: 10s
    agent_options:
      keepAlive: true
      maxSockets: 40
      maxFreeSockets: 10
packages:
  '@*/*':
    # scoped packages
    access: $all
    publish: $authenticated
    proxy: npmjs

  '**':
    access: $all
    publish: $authenticated
    proxy: npmjs

middlewares:
  audit:
    enabled: true
server:
  keepAliveTimeout: 60

# log settings
logs:
  - {type: stdout, format: pretty, level: http}

Environment information

Debugging output

  • $ NODE_DEBUG=request verdaccio display request calls (verdaccio <--> uplinks)
  • $ DEBUG=verdaccio* verdaccio enable extreme verdaccio debug mode (verdaccio api)
  • $ npm -ddd prints:
  • $ npm config get registry prints:

Contribute to Verdaccio

  • I'm willing to fix this bug 🥇
@juanpicado
Copy link
Member

Reproduced, It might be fixed with 6.x versions, I'll check if is fixable on 5.x versions.

@juanpicado juanpicado added this to the 5.x milestone Jul 9, 2023
@juanpicado juanpicado changed the title What caused the package.json file content to be abnormal? bug: dist-tag get out of sync with upstream registry Jul 9, 2023
@89ao
Copy link
Author

89ao commented Jul 9, 2023

thanks @juanpicado

@juanpicado juanpicado self-assigned this Jul 9, 2023
@juanpicado juanpicado modified the milestones: 5.x, 6.x Aug 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants