I have a basic angular project with two submodules that runs and build perfectly fine on my computer, but fails immediately on gitlab ci. The build is done inside a docker container, as seen below :
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
Edit : with --verbose
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
I first managed to fix the problem ONCE by switching from a basic alpine image to the node:16-alpine. But the build broke once again the next day. And now, I'm out of ideas...