[3/4] Linking dependencies...warning " > babel-loader@8.2.2" has unmet peer dependency "@babel/core@^7.0.0".warning " > @vue/cli-plugin-eslint@4.5.13" has incorrect peer dependency "eslint@>= 1.6.0 < 7.0.0".warning "@vue/cli-plugin-eslint > eslint-loader@2.2.1" has incorrect peer dependency "eslint@>=1.6.0 <7.0.0".warning "vue-cli-plugin-vite > vite-plugin-vue-cli@1.4.1" has incorrect peer dependency "vite@~2.0.0".[4/4] Building fresh packages...error /home/jenkins/agent/workspace/opshjsg5_scp-ui-web-pipeline_pre/node_modules/fibers: Command failed.Exit code: 1Command: node build.js || nodejs build.jsArguments:Directory: /home/jenkins/agent/workspace/opshjsg5_scp-ui-web-pipeline_pre/node_modules/fibersOutput:gyp info it worked if it ends with okgyp info using node-gyp@3.8.0gyp info using node@10.16.3 | linux | x64gyp http GET https://nodejs.org/download/release/v10.16.3/node-v10.16.3-headers.tar.gzgyp WARN install got an error, rolling back installgyp ERR! configure errorgyp ERR! stack Error: Client network socket disconnected before secure TLS connection was establishedgyp ERR! stack at TLSSocket.onConnectEnd (_tls_wrap.js:1095:19)gyp ERR! stack at Object.onceWrapper (events.js:286:20)gyp ERR! stack at TLSSocket.emit (events.js:203:15)gyp ERR! stack at endReadableNT (_stream_readable.js:1145:12)gyp ERR! stack at process._tickCallback (internal/process/next_tick.js:63:19)gyp ERR! System Linux 4.19.240-300.el7.x86_64gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--release"gyp ERR! cwd /home/jenkins/agent/workspace/opshjsg5_scp-ui-web-pipeline_pre/node_modules/fibersgyp ERR! node -v v10.16.3gyp ERR! node-gyp -v v3.8.0gyp ERR! not oknode-gyp exited with code: 1Please make sure you are using a supported platform and node version. If youwould like to compile fibers on this machine please make sure you have setup yourbuild environment--Windows + OS X instructions here: https://github.com/nodejs/node-gypUbuntu users please run: `sudo apt-get install g++ build-essential`RHEL users please run: `yum install gcc-c++` and `yum groupinstall 'Development Tools'`Alpine users please run: `sudo apk add python make g++`gyp info it worked if it ends with okgyp info using node-gyp@3.8.0gyp info using node@10.16.3 | linux | x64gyp http GET https://nodejs.org/download/release/v10.16.3/node-v10.16.3-headers.tar.gzgyp WARN install got an error, rolling back installgyp ERR! configure errorgyp ERR! stack Error: read ECONNRESETgyp ERR! stack at TLSWrap.onStreamRead (internal/stream_base_commons.js:111:27)gyp ERR! System Linux 4.19.240-300.el7.x86_64gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--release"gyp ERR! cwd /home/jenkins/agent/workspace/opshjsg5_scp-ui-web-pipeline_pre/node_modules/fibersgyp ERR! node -v v10.16.3gyp ERR! node-gyp -v v3.8.0gyp ERR! not oknode-gyp exited with code: 1Please make sure you are using a supported platform and node version. If youwould like to compile fibers on this machine please make sure you have setup yourbuild environment--Windows + OS X instructions here: https://github.com/nodejs/node-gypUbuntu users please run: `sudo apt-get install g++ build-essential`RHEL users please run: `yum install gcc-c++` and `yum groupinstall 'Development Tools'`Alpine users please run: `sudo apk add python make g++`info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.script returned exit code 1
原因
https://github.com/nodejs/node-gyp/issues/1798
解决方案
下载包上传到持久化目录 使用npm_config_tarball 指定包路径
sh 'npm_config_tarball=/root/.yarn/v4/node-v10.16.3-headers.tar.gz yarn install --frozen-lockfile'
https://theia-ide.org/docs/composing_applications
报错2 构建节点软件包未上传到缓存持久化目录
scp /data02/node-v10.16.3-headers.tar.gz /var/data/jenkins_nodejs_yarn_cache/v4/
[4/4] Building fresh packages...error /home/jenkins/agent/workspace/opshjsg5_scp-ui-web-pipeline_pre/node_modules/fibers: Command failed.Exit code: 7Command: node build.js || nodejs build.jsArguments:Directory: /home/jenkins/agent/workspace/opshjsg5_scp-ui-web-pipeline_pre/node_modules/fibersOutput:gyp info it worked if it ends with okgyp info using node-gyp@3.8.0gyp info using node@10.16.3 | linux | x64gyp ERR! UNCAUGHT EXCEPTIONgyp ERR! stack Error: ENOENT: no such file or directory, open '/root/.yarn/v4/node-v10.16.3-headers.tar.gz'gyp ERR! System Linux 4.19.240-300.el7.x86_64gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--release"gyp ERR! cwd /home/jenkins/agent/workspace/opshjsg5_scp-ui-web-pipeline_pre/node_modules/fibersgyp ERR! node -v v10.16.3gyp ERR! node-gyp -v v3.8.0gyp ERR! This is a bug in `node-gyp`.gyp ERR! Try to update node-gyp and file an Issue if it does not help:gyp ERR! <https://github.com/nodejs/node-gyp/issues>node-gyp exited with code: 7
