How to resolve "The cypress npm package is installed, but the Cypress binary is missing."

I’m trying to download and install Cypress within GitLab CI runner and getting this error output:

The cypress npm package is installed, but the Cypress binary is missing.
We expected the binary to be installed here: /root/.cache/Cypress/4.8.0/Cypress/Cypress
Reasons it may be missing:
- You're caching 'node_modules' but are not caching this path: /root/.cache/Cypress
- You ran 'npm install' at an earlier build step but did not persist: /root/.cache/Cypress
Properly caching the binary will fix this error and avoid downloading and unzipping Cypress.
Alternatively, you can run 'cypress install' to download the binary again.

I ran the suggested command cypress install but it didn’t help.
Next it says You're caching 'node_modules' but are not caching this path: /root/.cache/Cypress
I don’t understand how you can cache the modules and leave out the path to it.
Next is You ran 'npm install' at an earlier build step but did not persist I did have npm install in earlier builds so I replaced it with npm ci as it’s recommended in Cypress official docs in such cases.

No resolution though.

Here are relevant lines where the error occurs:

inside of Dockerfile:

COPY package.json /usr/src/app/package.json
COPY package-lock.json /usr/src/app/package-lock.json
RUN npm ci

inside the test runner:

docker-compose -f docker-compose-prod.yml up -d --build
./node_modules/.bin/cypress run --config baseUrl=http://localhost

inside the package.json:

{
  "name": "flask-on-docker",
  "dependencies": {
    "cypress": "^4.8.0"
  }
}

Can anyone point me in a right direction ?

Source: StackOverflow