【问题标题】:nexus 3 with proxy npm repository带有代理 npm 存储库的 nexus 3
【发布时间】:2023-03-05 17:33:01
【问题描述】:

我使用带有代理 npm 存储库的 nexus 3(影响从 3.2 到 3.13.0_01 的所有版本)。 有时当我构建我的 Angular 项目时,我会遇到这样的错误:

[ERROR] npm ERR! node v6.11.2
[ERROR] npm ERR! npm  v3.10.10
[ERROR] npm ERR! code ETARGET
[ERROR] 
[ERROR] npm ERR! notarget No compatible version found: ci-info@^1.3.0
[ERROR] npm ERR! notarget Valid install targets:
[ERROR] npm ERR! notarget 1.1.3, 1.1.2, 1.1.1, 1.1.0, 1.0.1, 1.0.0
[ERROR] npm ERR! notarget 
[ERROR] npm ERR! notarget This is most likely not a problem with npm itself.
[ERROR] npm ERR! notarget In most cases you or one of your dependencies are requesting
[ERROR] npm ERR! notarget a package version that doesn't exist.
[ERROR] npm ERR! notarget 
[ERROR] npm ERR! notarget It was specified as a dependency of 'is-ci'
[ERROR] npm ERR! notarget 

我发现 is-ci 依赖于 21 小时前发布的 npm。

一两天后,问题在没有我参与的情况下消失了。 我的仓库没有负缓存。 为什么会这样?

重启后问题解决。 我还注意到消息:“系统要求:最大文件描述符 [4096] 可能太低,至少增加到 [65536]。”

Nexus 在用户“nexus”下运行:

nexus$ ulimit -Sn
65536
nexus$ ulimit -Hn
65536

为什么会出现消息?

【问题讨论】:

    标签: npm nexus3


    【解决方案1】:

    尝试使存储库中的缓存无效。

    您可以在这里找到更多信息:https://help.sonatype.com/repomanager3/configuration/repository-management#RepositoryManagement-ManagingRepositoriesandRepositoryGroups

    这是关于缓存失效的片段:

    缓存无效

    使缓存无效按钮使此存储库的缓存无效。确切的行为取决于存储库类型:

    代理存储库

    使代理存储库上的缓存无效会清除代理缓存,以便在下次请求时再次检查缓存为可用的任何项目是否有任何更改。这也会清除代理存储库的负缓存,以便在定义的缓存期限内未找到的任何项目将在下次请求时再次检查。

    存储库组

    使存储库组的缓存无效,清除组缓存,以便清除组缓存中获取和保存的任何项目,例如 Maven 元数据。此操作还会使作为该组成员的任何代理和组存储库的缓存无效。

    【讨论】:

    • 发布链接作为答案时,请确保包含链接内容的最少描述,否则您的问题可能会被标记为not an answer。查看this meta thread了解更多信息
    猜你喜欢
    • 1970-01-01
    • 2019-11-03
    • 1970-01-01
    • 1970-01-01
    • 2018-02-19
    • 2021-05-12
    • 1970-01-01
    • 2020-08-02
    • 2011-08-27
    相关资源
    最近更新 更多