I'm working on Salesforce Dx trailhead . When creating Scratch org using command
sfdx force:org:create -s -f config/project-scratch-def.json -a GeoAppScratch
I'm getting this error:
ERROR: No defaultdevhubusername org found.
Run the "sfdx force:auth" commands with --setdefaultdevhubusername to connect to a Dev Hub org and set it as your default Dev Hub.
Run "force:org:list" to see a list of locally registered orgs.
Run "sfdx force:config:set defaultdevhubusername=" to set your default Dev Hub username.
Even I tried to set default Org using below command
sfdx force:auth:web:login --setdefaultdevhubusername --setalias DevHub
But I'm getting this error:
ERROR: ENOENT: no such file or directory, open 'C:\Users\ABC\AppData\Local\sfdx\client\node_modules\content-type\index.js'.
In trailhead creating scratch org is given as 3rd command, I'm not sure if I need to login in DevHub or not, as there is no other information available in trailhead.