【发布时间】:2021-08-10 09:48:05
【问题描述】:
我正在尝试将 NodeJS 包发布到 GCP 中的私有存储库,使用此快速入门配置 .npmrc 文件和身份验证:https://cloud.google.com/artifact-registry/docs/nodejs/quickstart,当我尝试通过命令行发布它时,它返回错误:
verbose stack FetchError: request to https://myurl-gcp/myproject/myrepo/@scope%2fmypackage failed, reason: write EPIPE
verbose stack at ClientRequest.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/minipass-fetch/lib/index.js:110:14)
verbose stack at ClientRequest.emit (node:events:378:20)
verbose stack at TLSSocket.socketErrorListener (node:_http_client:462:9)
verbose stack at TLSSocket.emit (node:events:378:20)
verbose stack at emitErrorNT (node:internal/streams/destroy:188:8)
verbose stack at emitErrorCloseNT (node:internal/streams/destroy:153:3)
verbose stack at processTicksAndRejections (node:internal/process/task_queues:81:21)
如果我尝试打包项目,它可以工作,如果我在另一个项目中使用它作为导入模块,它也可以工作。
版本 NPM:7.20.5 版本节点:15.11.0
任何疑问为什么会发生?
【问题讨论】:
-
你试过
npm login吗?
标签: npm google-cloud-platform repository publish artifact