[SalesForce] can’t create scratch org (fatal ended with exit code 0 no error description)

I gather that this question has been asked before but so far I haven't found anyone with the same error (or lack thereof) since the VS code status says

SFDX: Create a Default Scratch Org… successfully ran

But the output reads

Starting SFDX: Create a Default Scratch Org…

16:18:46.788 sfdx force:org:create -f config\project-scratch-def.json
–setalias trailhead –durationdays 7 –setdefaultusername –json –loglevel fatal

16:19:14.800 sfdx force:org:create -f config\project-scratch-def.json –setalias trailhead –durationdays 7
–setdefaultusername –json –loglevel fatal ended with exit code 0

I was following along this Create a Lightning Web Component module and everything was going fine until step 3, "create a scratch org." I did of course login (sfdx force:auth:web:login -d -a DevHub just in case) and frankly that step just says "select SFDX: Create a Default Scratch Org and press Enter 3 times" so it shouldn't be this complicated… I just updated to the newest CLI version too. What can I do about this?

Best Answer

sfdx force:org:create -f config/project-scratch-def.json --setalias <alias> --durationdays 7 
    --setdefaultusername --json --loglevel fatal

is the expected command for Salesforce DX to run. The word fatal is the argument of the option --loglevel, not an indication of an error; that logging level suppresses output messages other than a fatal failure.

Exit code 0 connotes a successful command run.

Barring some other indication of a failure, your scratch org request succeeded.

Related Topic