Woocommerce-admin: WP 5: regeneratorRuntime is not defined error when SCRIPT_DEBUG false

Created on 7 Nov 2018  路  5Comments  路  Source: woocommerce/woocommerce-admin

Describe the bug

The WooCommerce dashboard fails to load unless you have define('SCRIPT_DEBUG', true); in wp-config.php. Possible WordPress 5 problem.

To Reproduce
Steps to reproduce the behavior:

  1. Install WordPress 5 (e.g. 5.0-beta3-43876)
  2. Set SCRIPT_DEBUG to false (in wp-config.php)
  3. Navigate to wp-admin > WooCommerce > Dashboard
  4. Note that the dashboard fails to load - the following is logged in the console:
Uncaught ReferenceError: regeneratorRuntime is not defined
    at api-fetch.min.js?ver=5.0-beta3-43876:1
bug

All 5 comments

FWIW I do not get this bug on WP 4.9.8 with wc-admin so likely something 5.0 related as you suggested. And I too can recreate the issue on 5.0-beta3-43876

From my searching this error is typically triggered by the absence of some Babel polyfills, appears this might be a related fix implemented elsewhere: https://github.com/Yoast/wordpress-seo/pull/10969

@timmyc wrote

And I too can recreate the issue on 5.0-beta3-43876

My setup updated today to 5.0-beta3-43876 and the problem vanished. Would you double check?

@allendav confirmed today with 5.0-beta3-43878 and removing the SCRIPT_DEBUG requirement in wc-admin.php all is well. No more regeneratorRuntime

Thanks @timmyc - I'll use this issue to remove the SCRIPT_DEBUG requirement in wc-admin.php then

Was this page helpful?
0 / 5 - 0 ratings