Error while creating scratch Org
I was trying to create a scratch def org following the trailhead
But get stuck in the following section Create and Test Our Scratch Org - Step 2
while executing the following command getting the following error.
sfdx force:org:create -s -f config/project-scratch-def.json -a dreamhouse-org
ERROR running force:org:create: Must pass a username and/or OAuth options when creating an AuthInfo instance.
Steps Executed
Created Project in VSCode
Authorized an Org
Executed Trailhead steps as mentioned in the link
How can I resolve the error while creating scratch def org?
To resolve this error, do the following step :
1- Re auth your org in ebikes-lwc folder(or your named folder) via following
sfdx force:auth:web:login -d -a ebikeslwcOrgAlias
2 -Now try to create scratch org :
sfdx force:org:create -s -f config/project-scratch-def.json -a ebikes
How do I create a Salesforce scratch def org account in salesforce?
Here we have the steps for Creating a Scratch def Org via an Org Shape in Salesforce:
- Step 1: Getting Started
- Step 2: Copy the SF Organization ID
- Step 3: Paste the Organization ID
- Step 4: Authorize both orgs in VSC.
- Step 5: Create the shape org using sfdx
- Step 6: Create a scratch org.
- Step 7: Run the “create” command.