blues-stack icon indicating copy to clipboard operation
blues-stack copied to clipboard

Race condition in npm run dev

Open humphd opened this issue 2 years ago • 5 comments

Have you experienced this bug with the latest version of the template?

Yes

Steps to Reproduce

npm run dev

Expected Behavior

I would expect npm run dev to always build and start the various servers without problems related to build timing/order.

Actual Behavior

Sometimes when running npm run dev, the various parallel build processes happen in an order such that the server can't start:

https://github.com/remix-run/blues-stack/blob/main/package.json#L10-L14

The only way to fix this is to manually run npm run build then re-try npm run dev. I guess because these commands aren't finishing (due to --watch), it isn't easy to know when to run the next step? Regardless, it would be good to find a better way to do this that doesn't randomly fail.

humphd avatar Feb 28 '23 19:02 humphd