How to clear cache on branch deploy?

Hi @gilesbutler! Welcome to netlify community.

There are several options here.

  1. You could update the package version specifically in package.json; then we should automatically install the newest version.
  2. If npm install doesn’t fail, you could make your build command something like npm i mypackage && npm run build
  3. We’ve just started to beta test build plugins, which will allow you to create custom logic
  4. Finally, yes, you could remove cache after each build by running something like npm run build && rm -rf /path/to/cache

Let us know what you decide to do!