As of May 31, 2023, Shopify CLI 2.x is deprecated for app and theme development, and is no longer supported. You should use Shopify CLI 3.x for all development tasks moving forward.
Shopify will block app and extension commmands for all CLI 2.x users in the coming weeks.
Theme commands will continue to function in the near term.
Learn how to migrate to Shopify CLI 3.x using the following guides: