Thanks for including those @rkleinert.
It looks like 2 or 3 issues. The first, about
SERVER_NAME being undefined is about how when running with WP_CLI, we’re not going through the webserver, so don’t see the
SERVER_NAME variable defined. I need to check on the best way to recommend to do that. Oops, looks like I swept it under the rug last time I encountered it: https://github.com/WP2Static/wp2static/issues/230
I’ve seen suggestions of how to dynamically set that in wp-config.php when it’s not found, that may be worth a little searching and checking your own wp-config.php in case there’s any existing lines around it.
WP_DEBUG already defined is a bit odd, maybe also double-check it’s not defined twice within your wp-config.php, else it’s probably being set somewhere else.
Those query related issues I have seen, IIRC, only when WooCommerce was installed - is that your case? It’s something off in the URL detection queries I need to get back to. They shouldn’t be blocking the URL detection/crawling at all, so I’d work on clearing the first 2 notices first. Maybe try disabling all other plugins and re-running, then turn on one by one to isolate if it appears to be coming from a plugin/theme.
Sorry this isn’t a very conclusive solution yet!
If you don’t get any luck, I can try to reproduce your setup on a Mac I have here.