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

同步依赖包时,没有使用与主包相同的 registry,导致依赖包同步失败 #642

Open
laibao101 opened this issue Jan 22, 2024 · 1 comment
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@laibao101
Copy link
Contributor

laibao101 commented Jan 22, 2024

https://github.com/cnpm/cnpmcore/blob/08678c70db1c1b5425ee713bbccbe5c395e98b3a/app/core/service/PackageSyncerService.ts#L893C3-L897C10

image

同步主包时,可以通过指定 registryName 来指定同步的源,但是同步依赖包时,没有使用同样的源。

场景:

  • sourceRegistry: a.com
  • 增加一个 registry, b.com, name: b
  • 创建同步任务时,指定 registryName 为 b
    此时主包使用 b.com 来同步,依赖包会使用 a.com 来同步。最终结果是主包正常同步,依赖包同步失败。
@fengmk2 fengmk2 added bug Something isn't working help wanted Extra attention is needed labels Jan 23, 2024
@elrrrrrrr
Copy link
Member

目前会通过 dependencyName 的 scope 或者 registryId 信息来计算出对应的 targetRegistry 。

现在是遇到了一些没有 scope 或者没有配置过 registryId 的依赖同步报错吗?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants