If you are having stack trace or SHOPIFY_CLI_STACKTRACE=1 kind of errors then this might fix your issue.
Install the following or make sure all are installed
- Node & NPM
https://nodejs.org/en/download/
To check on cmd: node -v, npm -v - Install Ruby and Rubygems
https://www.ruby-lang.org/en/downloads/
https://rubygems.org/
To check: ruby -v, gem -v - Install Git SCM version
https://git-scm.com/downloads
Command: git –version - Install Shopify CLI on command prompt
gem install shopify-cli
To check: shopify version
Now follow shopify documentation