首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >Gitlab-Ci : npm错误!运行npm安装时,在每个构建上编写EPIPE代码

Gitlab-Ci : npm错误!运行npm安装时,在每个构建上编写EPIPE代码
EN

Stack Overflow用户
提问于 2022-10-17 09:27:32
回答 1查看 381关注 0票数 2

我有一个基本的角度项目,有两个子模块,在我的计算机上运行和构建非常好,但在gitlab ci上立即失败。构建是在一个码头容器中完成的,如下所示:

代码语言:javascript
运行
复制
image: node:16-alpine
before_script:
  - apk update
  - apk add git
  - git submodule update --init --recursive

build:
  only:
    - develop
  script:
    - npm ci
    - npm run build
代码语言:javascript
运行
复制
$ npm ci
npm ERR! code EPIPE
npm ERR! syscall write
npm ERR! errno -32
npm ERR! write EPIPE
npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2022-10-17T09_20_04_458Z-debug-0.log

编辑:使用--详细的

代码语言:javascript
运行
复制
 npm http fetch POST 400 http://153.89.23.53:8082/repository/npm-all/-/npm/v1/security/audits/quick 106ms
npm verb audit error HttpErrorGeneral: 400 Bad Request - POST http://153.89.23.53:8082/repository/npm-all/-/npm/v1/security/audits/quick
npm verb audit error     at /usr/local/lib/node_modules/npm/node_modules/npm-registry-fetch/lib/check-response.js:95:15
npm verb audit error     at processTicksAndRejections (node:internal/process/task_queues:96:5)
npm verb audit error     at async Map.[getReport] (/usr/local/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/audit-report.js:335:21)
npm verb audit error     at async Map.run (/usr/local/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/audit-report.js:106:19)
npm verb audit error  HttpErrorGeneral: 400 Bad Request - POST http://153.89.23.53:8082/repository/npm-all/-/npm/v1/security/audits/quick
npm verb audit error     at /usr/local/lib/node_modules/npm/node_modules/npm-registry-fetch/lib/check-response.js:95:15
npm verb audit error     at processTicksAndRejections (node:internal/process/task_queues:96:5)
npm verb audit error     at async Map.[getReport] (/usr/local/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/audit-report.js:335:21)
npm verb audit error     at async Map.run (/usr/local/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/audit-report.js:106:19) {
npm verb audit error   headers: [Object: null prototype] {
npm verb audit error     date: [ 'Mon, 17 Oct 2022 11:04:28 GMT' ],
npm verb audit error     server: [ 'Nexus/3.30.0-01 (OSS)' ],
npm verb audit error     'x-content-type-options': [ 'nosniff' ],
npm verb audit error     'content-security-policy': [
npm verb audit error       'sandbox allow-forms allow-modals allow-popups allow-presentation allow-scripts allow-top-navigation'
npm verb audit error     ],
npm verb audit error     'x-xss-protection': [ '1; mode=block' ],
npm verb audit error     'content-type': [ 'application/json' ],
npm verb audit error     'content-length': [ '228' ],
npm verb audit error     'x-fetch-attempts': [ '1' ]
npm verb audit error   },
npm verb audit error   statusCode: 400,
npm verb audit error   code: 'E400',
npm verb audit error   method: 'POST',
npm verb audit error   uri: 'http://153.89.23.53:8082/repository/npm-all/-/npm/v1/security/audits/quick',
npm verb audit error   body: <Buffer 0a 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d ... 178 more bytes>,
npm verb audit error   pkgid: 'quick'
npm verb audit error }
npm timing auditReport:getReport Completed in 1449ms
npm timing reify:audit Completed in 1452ms
npm verb stack Error: write EPIPE
npm verb stack     at WriteWrap.onWriteComplete [as oncomplete] (node:internal/stream_base_commons:94:16)
npm verb cwd /builds/Xperthis-UX/care_frontend_ux
npm verb Linux 3.10.0-1160.49.1.el7.x86_64
npm verb node v16.18.0
npm verb npm  v8.19.2
npm ERR! code EPIPE
npm ERR! syscall write
npm ERR! errno -32
npm ERR! write EPIPE
npm verb exit -32
npm timing npm Completed in 5033ms

我第一次成功地解决了这个问题,从一个基本的高寒图像切换到节点:16-高寒。但是第二天,建筑又一次破裂了。现在,我没有主意了..。

EN

回答 1

Stack Overflow用户

发布于 2022-10-20 16:04:36

今天我在我的Gitlab管道上运行"npm安装“时,也遇到了同样的问题。

似乎在节点版本16.18中发生了一些变化(当前节点:最新的停靠中心)。

在我的管道中,我没有使用节点:node:16.17.1-buster,而是将其设置为固定版本:在此之后,管道再次运行。

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/74095146

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档