npm - Npm 发布在 GCP 中返回写入 EPIPE 错误
问题描述
我正在尝试将 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
任何疑问为什么会发生?
解决方案
解决!
我错过了包裹files
中的财产。package.json
我也遇到了问题,因为我使用的是公司代理并且包有大约 20 MB,所以也删除了它工作的捆绑依赖项!
推荐阅读
- c - 如何在没有任何非标准库的情况下在 C 中进行多处理
- ruby-on-rails - 测试 ActiveStorage 附件 (FileNotFound)
- c - 内存中的 C 指针数据结构
- ruby-on-rails - rails凭据未获取
- fortran - 将一个基本过程传递给另一个基本过程
- php - Mysql 文本字段同时包含
和:如何循环只是?
- excel - 带有可定制正文和签名的群发电子邮件
- oracle-apex - ApEx 19.1 表单区域项值未在插入/创建时传递
- asp.net - HiddenFor 不向控制器传递值?
- c# - 使用 URI 作为源时,并非所有图像都加载到我的视图中