In the following article, we provide tips on how to bring Magento PWA Studio back to life when a Javascript Webpack hangs before launching compilation. The problem only affects developers who work with the native PWA tools of Magento 2. If you are looking for more useful tips, check our Magento 2 Cookbook. Now, let’s focus on the reason why Webpack hangs without even starting compilation and on how to bring PWA Studio back to life.
The Issue
Let’s assume that you’ve just set up a PWA Studio storefront with a local Magento instance and try to run a buildor watchcommand. What would you normally expect?
Usually, the former generates the build artifacts for the storefront. As for the latter, it starts the PWA storefront.
However, actual results don’t meet these expectations. Either the buildor watchcommand hangs without completion. At the same time, no errors are displayed. So, how to fix the issue and continue your work with the PWA project?
The Solutions
First of all, it is necessary to know whether you use the latest version of the pwa-buildpack or not. Follow these steps: