cnpm / cnpmcore

Private NPM Registry for Enterprise
https://npmmirror.com
MIT License
607 stars 80 forks source link

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

Open laibao101 opened 8 months ago

laibao101 commented 8 months ago

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

image

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

场景:

elrrrrrrr commented 8 months ago

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

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