我有一个基本的角度项目,有两个子模块,在我的计算机上运行和构建非常好,但在gitlab ci上立即失败。构建是在一个码头容器中完成的,如下所示:
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
$ 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
编辑:使用--详细的
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-高寒。但是第二天,建筑又一次破裂了。现在,我没有主意了..。
发布于 2022-10-20 16:04:36
今天我在我的Gitlab管道上运行"npm安装“时,也遇到了同样的问题。
似乎在节点版本16.18中发生了一些变化(当前节点:最新的停靠中心)。
在我的管道中,我没有使用节点:node:16.17.1-buster,而是将其设置为固定版本:在此之后,管道再次运行。
https://stackoverflow.com/questions/74095146
复制相似问题