Npm ERR! network request to https://registry.npmjs.org/yauzl/-/yauzl-2.10.0.tgz failed, reason: Client network socket disconnected before secure TLS connection was established

Problem to solve

I’m having a problem with a build pipeline running and installing NPM packages so I can run cypress tests. The errors I keep getting are:

$ npm ci

[25](https://gitlab.com/wpp1/uoe-study/-/jobs/6631271263#L25)npm ERR! code ECONNRESET
[26](https://gitlab.com/wpp1/uoe-study/-/jobs/6631271263#L26)npm ERR! errno ECONNRESET
[27](https://gitlab.com/wpp1/uoe-study/-/jobs/6631271263#L27)npm ERR! network request to https://registry.npmjs.org/yauzl/-/yauzl-2.10.0.tgz failed, reason: Client network socket disconnected before secure TLS connection was established
[28](https://gitlab.com/wpp1/uoe-study/-/jobs/6631271263#L28)npm ERR! network This is a problem related to network connectivity.
[29](https://gitlab.com/wpp1/uoe-study/-/jobs/6631271263#L29)npm ERR! network In most cases you are behind a proxy or have bad network settings.
[30](https://gitlab.com/wpp1/uoe-study/-/jobs/6631271263#L30)npm ERR! network
[31](https://gitlab.com/wpp1/uoe-study/-/jobs/6631271263#L31)npm ERR! network If you are behind a proxy, please make sure that the
[32](https://gitlab.com/wpp1/uoe-study/-/jobs/6631271263#L32)npm ERR! network 'proxy' config is set properly. See: 'npm help config'
[33](https://gitlab.com/wpp1/uoe-study/-/jobs/6631271263#L33)npm ERR! A complete log of this run can be found in: /root/.npm/_logs/2024-04-15T20_57_27_497Z-debug-0.log

The test job part of gitlab-ci.yml looks like:

uoe_ci:cypress_tests:
  stage: test
  before_script:
    - npm install
  script:
    - npm run e2e
  artifacts:
    paths:
      - cypress/**/*
  rules:
    - if: $CI_MERGE_REQUEST_ID
    - if: $CI_COMMIT_BRANCH =~ /^release/
    - if: $CI_COMMIT_BRANCH =~ /^project/
    - if: $CI_COMMIT_BRANCH =~ /^hotfix/
    - if: $CI_COMMIT_BRANCH == "master"

I’m using a custom Docker image that I built from two sources and that can be found here:

Really, I’m not sure why I’m getting these network errors. Would welcome any suggestions!

Thanks in advance!