我有一个基本的angular项目,它有两个子模块,在我的计算机上运行和构建都很好,但是在gitlab ci上立即失败。构建是在一个docker容器中完成的,如下所示:
第一个
编辑:使用**--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
我第一次设法解决了这个问题,从一个基本的阿尔卑斯山图像切换到节点:16-阿尔卑斯山。但建设再次打破了第二天。现在,我没有办法了...
1条答案
按热度按时间flvtvl501#
我今天在使用Gitlab-Ci管道运行“npm install”时遇到了同样的问题。
节点版本16.18(当前节点:Docker hub上的最新版本)中似乎发生了一些变化。
我没有使用node:latest,而是将其设置回固定版本:节点:16.17.1-buster之后管道再次运行。