Widgets error Sage 10.0

Trying to access /wp/wp-admin/widgets.php, getting
“wp-editor” script should not be enqueued together with the new widgets editor

This does not happen in a fresh install of Sage 10 (from what I just tested), but I ran into this issue myself in one of my themes with my editor.js.


if (get_current_screen()->base === 'widgets') {

to the top of enqueue_block_editor_assets fixed the issue for me. Not sure if there’s a better way.

Possibly also fixed by fix(bundle-editor): remove `@wordpress/edit-post` by retlehs · Pull Request #2932 · roots/sage · GitHub depending on which version of Sage 10 you’re on

This only happen if you have WP_DEBUG active and go into Widgets… The workaround @Log1x used is the same one I use to solve this…

Added this condition to enqueue_block_editor_assets in setup.php. Doesn’t help. Also tried pasting it to wp_enqueue_scripts, no effect either.

Thanks! Helped, using as a temp workaround.