1. [3/4] Linking dependencies...
    2. warning " > babel-loader@8.2.2" has unmet peer dependency "@babel/core@^7.0.0".
    3. warning " > @vue/cli-plugin-eslint@4.5.13" has incorrect peer dependency "eslint@>= 1.6.0 < 7.0.0".
    4. warning "@vue/cli-plugin-eslint > eslint-loader@2.2.1" has incorrect peer dependency "eslint@>=1.6.0 <7.0.0".
    5. warning "vue-cli-plugin-vite > vite-plugin-vue-cli@1.4.1" has incorrect peer dependency "vite@~2.0.0".
    6. [4/4] Building fresh packages...
    7. error /home/jenkins/agent/workspace/opshjsg5_scp-ui-web-pipeline_pre/node_modules/fibers: Command failed.
    8. Exit code: 1
    9. Command: node build.js || nodejs build.js
    10. Arguments:
    11. Directory: /home/jenkins/agent/workspace/opshjsg5_scp-ui-web-pipeline_pre/node_modules/fibers
    12. Output:
    13. gyp info it worked if it ends with ok
    14. gyp info using node-gyp@3.8.0
    15. gyp info using node@10.16.3 | linux | x64
    16. gyp http GET https://nodejs.org/download/release/v10.16.3/node-v10.16.3-headers.tar.gz
    17. gyp WARN install got an error, rolling back install
    18. gyp ERR! configure error
    19. gyp ERR! stack Error: Client network socket disconnected before secure TLS connection was established
    20. gyp ERR! stack at TLSSocket.onConnectEnd (_tls_wrap.js:1095:19)
    21. gyp ERR! stack at Object.onceWrapper (events.js:286:20)
    22. gyp ERR! stack at TLSSocket.emit (events.js:203:15)
    23. gyp ERR! stack at endReadableNT (_stream_readable.js:1145:12)
    24. gyp ERR! stack at process._tickCallback (internal/process/next_tick.js:63:19)
    25. gyp ERR! System Linux 4.19.240-300.el7.x86_64
    26. gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--release"
    27. gyp ERR! cwd /home/jenkins/agent/workspace/opshjsg5_scp-ui-web-pipeline_pre/node_modules/fibers
    28. gyp ERR! node -v v10.16.3
    29. gyp ERR! node-gyp -v v3.8.0
    30. gyp ERR! not ok
    31. node-gyp exited with code: 1
    32. Please make sure you are using a supported platform and node version. If you
    33. would like to compile fibers on this machine please make sure you have setup your
    34. build environment--
    35. Windows + OS X instructions here: https://github.com/nodejs/node-gyp
    36. Ubuntu users please run: `sudo apt-get install g++ build-essential`
    37. RHEL users please run: `yum install gcc-c++` and `yum groupinstall 'Development Tools'`
    38. Alpine users please run: `sudo apk add python make g++`
    39. gyp info it worked if it ends with ok
    40. gyp info using node-gyp@3.8.0
    41. gyp info using node@10.16.3 | linux | x64
    42. gyp http GET https://nodejs.org/download/release/v10.16.3/node-v10.16.3-headers.tar.gz
    43. gyp WARN install got an error, rolling back install
    44. gyp ERR! configure error
    45. gyp ERR! stack Error: read ECONNRESET
    46. gyp ERR! stack at TLSWrap.onStreamRead (internal/stream_base_commons.js:111:27)
    47. gyp ERR! System Linux 4.19.240-300.el7.x86_64
    48. gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--release"
    49. gyp ERR! cwd /home/jenkins/agent/workspace/opshjsg5_scp-ui-web-pipeline_pre/node_modules/fibers
    50. gyp ERR! node -v v10.16.3
    51. gyp ERR! node-gyp -v v3.8.0
    52. gyp ERR! not ok
    53. node-gyp exited with code: 1
    54. Please make sure you are using a supported platform and node version. If you
    55. would like to compile fibers on this machine please make sure you have setup your
    56. build environment--
    57. Windows + OS X instructions here: https://github.com/nodejs/node-gyp
    58. Ubuntu users please run: `sudo apt-get install g++ build-essential`
    59. RHEL users please run: `yum install gcc-c++` and `yum groupinstall 'Development Tools'`
    60. Alpine users please run: `sudo apk add python make g++`
    61. info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
    62. script returned exit code 1

    原因

    1. https://github.com/nodejs/node-gyp/issues/1798

    解决方案
    下载包上传到持久化目录 使用npm_config_tarball 指定包路径

    1. 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 构建节点软件包未上传到缓存持久化目录

    1. scp /data02/node-v10.16.3-headers.tar.gz /var/data/jenkins_nodejs_yarn_cache/v4/
    1. [4/4] Building fresh packages...
    2. error /home/jenkins/agent/workspace/opshjsg5_scp-ui-web-pipeline_pre/node_modules/fibers: Command failed.
    3. Exit code: 7
    4. Command: node build.js || nodejs build.js
    5. Arguments:
    6. Directory: /home/jenkins/agent/workspace/opshjsg5_scp-ui-web-pipeline_pre/node_modules/fibers
    7. Output:
    8. gyp info it worked if it ends with ok
    9. gyp info using node-gyp@3.8.0
    10. gyp info using node@10.16.3 | linux | x64
    11. gyp ERR! UNCAUGHT EXCEPTION
    12. gyp ERR! stack Error: ENOENT: no such file or directory, open '/root/.yarn/v4/node-v10.16.3-headers.tar.gz'
    13. gyp ERR! System Linux 4.19.240-300.el7.x86_64
    14. gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--release"
    15. gyp ERR! cwd /home/jenkins/agent/workspace/opshjsg5_scp-ui-web-pipeline_pre/node_modules/fibers
    16. gyp ERR! node -v v10.16.3
    17. gyp ERR! node-gyp -v v3.8.0
    18. gyp ERR! This is a bug in `node-gyp`.
    19. gyp ERR! Try to update node-gyp and file an Issue if it does not help:
    20. gyp ERR! <https://github.com/nodejs/node-gyp/issues>
    21. node-gyp exited with code: 7