hayes0724 / shopify-packer

Modern development tool for Shopify using Webpack 5. Easy to extend and customize, zero build config, compatible with Slate and existing websites.
https://hayes0724.github.io/shopify-packer/
MIT License
181 stars 37 forks source link

'Deploy already in progress' breaking watch task [BUG] #80

Open HarryFrancis opened 3 years ago

HarryFrancis commented 3 years ago

Describe the bug A clear and concise description of what the bug is. Whilst running the packer watch command and saving two files in quick succession, the library throws a 'Deploy already in progress' error.

This causes the watch command to stop. Ideally it should just carry on running, and queue another deployment with the new file?

To Reproduce Steps to reproduce the behavior:

  1. npm run watch
  2. Change a file
  3. Save
  4. Change again
  5. Save
  6. See error

(Note: Steps 2-5 need to happen quite quickly, so that the second save happens before the first finishes deploying)

Expected behavior I'd expect the second file saved to get queued for deployment after the first.

Screenshots

ezgif com-gif-maker

System (please complete the following information):

Packer (please complete the following information):

Theme (please complete the following information):

HarryFrancis commented 3 years ago

Wasn't sure where to put this, but here is the terminal output when running he recreation steps:

Watching for changes...
✔ Compiling...
✔  Compiled successfully in 0.067s!

↑  Uploading to Shopify...

[development] 0|1 [------------------------------------------------------------------------------]  0 %
✔ Compiling...
✔  Compiled successfully in 0.071s!
/Users/harryfrancis/.nvm/versions/node/v15.0.1/lib/node_modules/@hayes0724/shopify-packer/src/server/sync.js:24
    return Promise.reject(new Error('Deploy already in progress.'));
                          ^

Error: Deploy already in progress.
    at maybeDeploy (/Users/harryfrancis/.nvm/versions/node/v15.0.1/lib/node_modules/@hayes0724/shopify-packer/src/server/sync.js:24:27)
    at sync (/Users/harryfrancis/.nvm/versions/node/v15.0.1/lib/node_modules/@hayes0724/shopify-packer/src/server/sync.js:199:12)
    at Client.sync (/Users/harryfrancis/.nvm/versions/node/v15.0.1/lib/node_modules/@hayes0724/shopify-packer/src/server/client.js:32:13)
[development] 0|1 [------------------------------------------------------------------------------]  0 %
npm ERR! code 1
npm ERR! path /Users/harryfrancis/Documents/T&M/sauce/tm09-sauce-v3
npm ERR! command failed
npm ERR! command sh -c packer start --skipFirstDeploy

npm ERR! A complete log of this run can be found in:
[development] 1|1 [==============================================================================]  100 %
[development] 1|1 [==============================================================================]  100 %
[development] 1 files, Updated: 1