前端流水线无法拉取nexus3仓库问题处理
1. 问题现象
前端流水线出现打包错误,某个npm包版本不存在, 如下述的 rollup/rollup-darwin-arm64:4.55.3 包。
warning workspace-aggregator-5a6eae19-72e5-44b5-a64a-8f1a88a00c10 > fim > @opentiny/vue > @opentiny/vue-fluent-editor > @opentiny/fluent-editor > quill > quill-delta > lodash.isequal@4.5.0: This package is deprecated. Use require('node:util').isDeepStrictEqual instead.
warning workspace-aggregator-5a6eae19-72e5-44b5-a64a-8f1a88a00c10 > @imom-qms/abnormal-task > vite-plugin-dts > @microsoft/api-extractor > @rushstack/node-core-library > z-schema > lodash.get@4.4.2: This package is deprecated. Use the optional chaining (?.) operator instead.
error Couldn't find any versions for "@rollup/rollup-darwin-arm64" that matches "4.55.3"
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
Error: Couldn't find any versions for "@rollup/rollup-android-arm64" that matches "4.55.3"
at MessageError.ExtendableBuiltin (/usr/lib/node-18/lib/node_modules/yarn/lib/cli.js:721:66)
at new MessageError (/usr/lib/node-18/lib/node_modules/yarn/lib/cli.js:750:123)
at Function.<anonymous> (/usr/lib/node-18/lib/node_modules/yarn/lib/cli.js:50353:13)
at Generator.next (<anonymous>)
at step (/usr/lib/node-18/lib/node_modules/yarn/lib/cli.js:310:30)
at /usr/lib/node-18/lib/node_modules/yarn/lib/cli.js:321:13
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
Error: Couldn't find any versions for "@rollup/rollup-linux-arm64-gnu" that matches "4.55.3"
登录 http://192.168.181.114:8081 nexus3仓库,搜索 "rollup/rollup-darwin-arm64" 的确不存在版本 4.55.3

2. 修改 nexus3 npm-group相关配置
2.1 npm-proxy修改
将 "npm-proxy" 从members 中移出, 该 npm-proxy 使用的是境外的仓库地址,无法正常访问。members 中仅保留 npm-hosted(公司代码仓库), npm-taobao(国内镜像源)。

2.2 npm-taobao修改


将缓存更新时间从1天更改为1个小时, 上述配置的修改参考AI分析

2.3 手动触发npm包下载到私库
curl -u 'admin:仓库密码' -I "http://192.168.181.114:8081/repository/npm-taobao/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.55.3.tgz"
curl -u 'admin:仓库密码' \
-I "http://192.168.181.114:8081/repository/npm-group/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.55.3.tgz"
正常返回如下:
HTTP/1.1 200 OK
Date: Thu, 22 Jan 2026 06:37:28 GMT
Server: Nexus/3.37.3-02 (OSS)
X-Content-Type-Options: nosniff
Content-Security-Policy: sandbox allow-forms allow-modals allow-popups allow-presentation allow-scripts allow-top-navigation
X-XSS-Protection: 1; mode=block
Last-Modified: Wed, 21 Jan 2026 05:27:46 GMT
ETag: "26A280F34CFA25391E874DE9F3A62CA7"
Content-Type: application/gzip
Content-Length: 787963
如果返回404, 1. 确认版本号是否真实存在; 2. 过段时间尝试