slate icon indicating copy to clipboard operation
slate copied to clipboard

Template Cache Problem

Open masterShake opened this issue 5 years ago • 9 comments

I just started having a problem where the template is caching and will not reload when I change it. Watch is still refreshing the page by my changes to the markup are not displayed.

This situation is NOT remedied when I run build & deploy. It still uses the cached version. Only if I change the name of the template or file and build/deploy am I able to see my changes reflected. This is obviously unacceptable because it will take 5x as long to develop the theme if I have to go through this process every time I make a minor change.

How can I clear or even turn off the cache?

masterShake avatar Mar 05 '19 20:03 masterShake

I figured this out. Liquid won't compile if there are errors and the browser will never tell you there is something wrong. Gotta read the console output very closely.

masterShake avatar Mar 05 '19 20:03 masterShake

So the console does not tell you if there are errors in your liquid file when "watching" if you mess up you will never know.

As soon as liquid finds an error, the template breaks and uses the cached version. You need to stop watching and rerun "npm start" to get it going again. Is there a way to turn on error reporting without deploying?

masterShake avatar Mar 05 '19 20:03 masterShake

omg ++++++9999

reco avatar Mar 26 '19 20:03 reco

npm run deploy will give you at least an error message. just takes so long.

reco avatar Mar 26 '19 20:03 reco

Editing files directly in Shopify IDE also shows error messages

pfcodes avatar Apr 03 '19 21:04 pfcodes

Same observation, it's a real hell to debug. The console does not tell us anything. I am forced to work with the online IDE to see the mistakes made.

What a waste of time !

lorraineS avatar Apr 09 '19 10:04 lorraineS

Caching problem wasted my time also!!! This issue should be fixed in the next release.

anhkhoi avatar Jul 12 '19 07:07 anhkhoi

I've been having to copy paste code into an old Slate v0 version and having "slate watch" on that to check code that looks like is broken as v0 told us errors in the terminal. Other than that, "yarn deploy" and lots of waiting.

GuillermoCasanova avatar Aug 20 '19 20:08 GuillermoCasanova

I think I have a similar problem, today in 2021.

robstarkdev avatar Apr 14 '21 16:04 robstarkdev