Running wrangler from restored cache on Gitlab CI/CD

Hi,

I have the following CI/CD script on Gitlab:

image: buildkite/puppeteer

cache:
  key: ${CI_COMMIT_REF_SLUG}
  paths:
    - node_modules/

build:
  script:
    - npm install 
    - npm run build
    - npx wrangler publish

I have the following environment variable setup:

WRANGLER_INSTALL_PATH = to node_modules/

The first run works fine. However, any runs after that fail with: ‘You have not installed wrangler’.

Is there any way to make wrangler work from a restored node_modules folder?