Shopify / themekit

Shopify theme development command line tool.
https://shopify.dev/tools/theme-kit
MIT License
1.19k stars 375 forks source link

Theme watch delete all files from shopify #893

Open allfreelancers opened 3 years ago

allfreelancers commented 3 years ago

Describe the bug Theme watch delete all files from shopify (ALL FILES)

12:34:22 Reloading config changes 12:34:23 [development] Warning, this is the live theme on Genius Food Group Limited. 12:34:23 [development] Genius Food Group Limited: Watching for file changes to theme 114922586296 12:35:15 [development] processing assets/common.scss.liquid 12:35:17 [development] Updated assets/common.scss.liquid 12:35:17 [development] processing layout/theme.liquid 12:35:17 [development] Updated layout/theme.liquid 12:36:17 [development] processing assets/common.scss.liquid 12:36:19 [development] Updated assets/common.scss.liquid 12:42:39 [development] processing templates/page.menu.liquid

14:14:51 [development] processing assets/common.scss.liquid 14:14:53 [development] Updated assets/common.scss.liquid 14:15:19 [development] processing snippets/comment.liquid 14:15:20 [development] Deleted snippets/comment.liquid 14:15:20 [development] processing locales/es.json 14:15:20 [development] Deleted locales/es.json 14:15:20 [development] processing snippets/icon-resume.liquid 14:15:21 [development] Deleted snippets/icon-resume.liquid 14:15:21 [development] processing snippets/product-price.liquid

...

To Reproduce Steps to reproduce the behavior:

  1. run command 'theme watch --allow-live'
  2. work about 2-3 hours

Expected behavior A clear and concise description of what you expected to happen.

Environment (please complete the following information):

tanema commented 3 years ago

A couple questions.

allfreelancers commented 3 years ago
  1. Its does not matter live or dev
  2. Yes, after 2-3 hours of work, the process of deleting ALL files starts. You can do something or not, it starts by itself.
  3. Yes
  4. yes
allfreelancers commented 3 years ago

@tanema and so what?

tanema commented 3 years ago

I have no answers for you because this seemingly does not happen to anyone else. I have no way to reproduce this either. The only way themekit would delete the files is if the files are deleted and it gets those file events, so I am not sure how this would happen if your files are not deleted locally.

Do you have another tool running that may conflict with this. Do you do something else like do a git checkout.

tanema commented 3 years ago

Okay this is effecting someone else here https://github.com/Shopify/themekit/issues/912. It seems like you are both on windows. @allfreelancers Are you using WSL as well? Also can you please update to 1.1.6 to check if that helps as well I notice that you are on 1.1.5

mallmsy commented 3 years ago

This just happened to me as well - I inadvertently renamed a directory while running 'theme watch'. I corrected the file names locally, but themekit is not pushing them to the dev theme. Is there a way to push my local files to the dev theme?

oko-x commented 3 years ago

Happened to me as well. After some time Themekit starts removing the theme files.

15:24:58 [development] processing assets/theme.scss.liquid 15:25:00 [development] Updated assets/theme.scss.liquid 15:26:03 [development] processing assets/theme.scss.liquid 15:26:05 [development] Updated assets/theme.scss.liquid 15:27:04 [development] processing snippets/product-template--download.liquid 15:27:04 [development] Updated snippets/product-template--download.liquid 15:27:07 [development] processing assets/theme.scss.liquid 15:27:07 [development] Skipped assets/theme.scss.liquid (Checksum: 9ff5acaaf5dd748ea962348e896b12b0) ---- here it starts ---- 15:27:31 [development] processing templates/index.liquid 15:27:32 [development] Deleted templates/index.liquid 15:27:32 [development] processing templates/page.coa.liquid 15:27:32 [development] Deleted templates/page.coa.liquid 15:27:32 [development] processing snippets/search-drawer.liquid 15:27:32 [development] Deleted snippets/search-drawer.liquid 15:27:32 [development] processing templates/password.liquid 15:27:33 [development] Deleted templates/password.liquid 15:27:33 [development] processing templates/page.liquid 15:27:33 [development] Deleted templates/page.liquid 15:27:33 [development] processing templates/list-collections.liquid 15:27:34 [development] Deleted templates/list-collections.liquid 15:27:34 [development] processing snippets/product-template--primary_aromas.liquid 15:27:34 [development] Deleted snippets/product-template--primary_aromas.liquid 15:27:34 [development] processing templates/customers/login.liquid 15:27:34 [development] Deleted templates/customers/login.liquid 15:27:34 [development] processing templates/customers/reset_password.liquid 15:27:35 [development] Deleted templates/customers/reset_password.liquid 15:27:35 [development] processing snippets/product-variants-multiple-dropdown.liquid 15:27:35 [development] Deleted snippets/product-variants-multiple-dropdown.liquid ...

I haven't done rename or anything that could trigger this.

ashleyford commented 3 years ago

This has happened to me several times now using ThemeKit 1.1.6 darwin/amd64.

It appears to happen in sync with Chrome crashing.

Not sure how Themekit works, but could it be related to a temporary directory ThemeKit watches for changes that is somehow deleted?

barretinh0 commented 2 years ago

Hello, I had the same issue yesterday, it have deleted all my "assets", I had received the message "Reloading config changes", and crashs it, no more logs, no way to stops, I had to kill terminal process. I'm using macOS High Sierra 10.13.6. I was using on live, about 5 hours, making changes on css, and a few product card files.

Fortunely, I always have a backup, so it was easy to fix, but is really weird it.

(Its not my case, but I believe its normal to remove files when you rename directory, Shopify doesn't allow you to create new directories, so, if you rename, is the same as you create a new one, so it will remove...)

hagsonz commented 2 years ago

+1 have the same issue with WLS2 and a devcontainer

when starting vscode and running watch, i need to wait until it deletes all and reupload..

ThemeKit 1.3.0 linux/amd64

JoseNaranjoDev commented 2 years ago

This happens to me too, starts to delete random files. VScode windows 11 home ThemeKit version .... IDK .. from 2weeks ago.

DevKarl commented 2 years ago

This happened to me a week ago, i suspect a bug with Shopifys "Theme Kit Access" app. It starts deleting files randomly, same here after 2-3 hours of working. Even doing a hard reset to restore files to last commit, and running "theme deploy" or "theme watch" will not fix this issue and add the files back.Temporary solution is to just make constant local copies of the theme files and manually upload them if the bug happens again.

Jose-Juan-Naranjo commented 1 year ago

Ok, So it did it again and I let it run. After deleting a bunch of files, it then started to process updates to a bunch of files. Then it stopped, and all the files are there again... So, I guess just let it do its thing. It happened twice and twice it brought the files back again.

Let it do its thing....Let it run....