Hi @gilesbutler! Welcome to netlify community.
There are several options here.
- You could update the package version specifically in package.json; then we should automatically install the newest version.
- If npm install doesn’t fail, you could make your build command something like
npm i mypackage && npm run build
- We’ve just started to beta test build plugins, which will allow you to create custom logic
- 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!