2

With my Netlify site I can manually choose to trigger a deployment on my master branch and opt to clear the cache.

enter image description here

However I cannot find a way of doing this with my Deploy Preview branch.

I have made an npm package version change and Deploy Preview isn't picking up on my change. Instead it's restoring the existing node_modules:

enter image description here

How can I manually trigger a deployment of Deploy Preview with cache clear, or disable the restoration of node_modules when rebuilding a Deploy Preview branch?

asked Jun 12, 2018 at 12:06
2
  • I would also like to do this since I frequently encounter deploy errors when caching is used. Commented Oct 25, 2018 at 10:53
  • Note that this is now possible by choosing the Clear cache and deploy site option on a site's Deploys page. Commented Mar 22, 2020 at 17:22

1 Answer 1

2

There is no way for you to trigger a cache-cleared deploy preview, though Netlify's helpdesk can for you.

However, that shouldn't be needed. We intend to re-run npm install or yarn install if the checksum on /package.json or /yarn.lock changes:

https://github.com/netlify/build-image/blob/master/run-build-functions.sh#L54

How did you change the package version?

answered Jun 12, 2018 at 15:06
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.