[Bug]: Shopify theme dev not picking up most recent file change #4764
Labels
Area: @shopify/theme
@shopify/theme package issues
important
second highest severity for theme related bug
State: Waiting for feedback
Type: Bug
Something isn't working
Please confirm that you have:
In which of these areas are you experiencing a problem?
Theme
Expected behavior
Remote theme should have latest version of local file
Actual behavior
Remote theme has an empty version of the file
I'm using Tailwind and it's in dev/watch mode where it rebuilds when changes occur. What I believe is happening is that it goes to update the local file and clears it and then immediately inserts the new file contents. The Shopify CLI seems to only be picking up when the file gets cleared, but not when the new tailwind file contents get inserted. I've checked the remote via the code editor built into shopify and see the file with no contents. If I manually add a new line to the file and save it will update it and fix it.
It only happens sometimes so it's likely to be some sort of race condition.
Verbose output
2024-10-29T05:21:41.515Z: Reading the content of file at sections/v2-tab-images.liquid...
2024-10-29T05:21:41.949Z: Reading the content of file at assets/tailwind.min.css...
2024-10-29T05:21:42.097Z: Request to https://{redacted}.myshopify.com/admin/api/unstable/themes/144575332602/assets/bulk.json completed in 571 ms
With response headers:
• 01:21:42 Synced » update sections/v2-tab-images.liquid
2024-10-29T05:21:42.980Z: Request to https://{redacted}.myshopify.com/admin/api/unstable/themes/144575332602/assets/bulk.json completed in 1027 ms
With response headers:
• 01:21:42 Synced » update assets/tailwind.min.css
Reproduction steps
npx tailwindcss -i tailwind-input.css -o assets/tailwind.min.css --watch
Operating System
Windows 11 with Ubuntu 20.04.6 LTS through WSL 2
Shopify CLI version (check your project's
package.json
if you're not sure)3.69.3
Shell
fish
Node version (run
node -v
if you're not sure)v20.10.0
What language and version are you using in your application?
No response
The text was updated successfully, but these errors were encountered: