Who use local server like OpenServer, start with input next commands:
composer self-update
composer clearcache
After you must be sure for environment, where your’s server is run. Try for yarn and npm commands into console, if it’s work you can setup yii3 in next step =)
P.S. For OpenServer Settings->Server->Settings of PATH and select Path + userdata/config/path.txt +Win Path. And then close the console and restart the server. That’s all.