How to resolve error with drupal commerce 2 installation via composer
This turned out to be a problem of running composer through Acquia Dev Desktop's terminal launcher.

When using native terminal the installation completes without issue.