b2c-crm-sync icon indicating copy to clipboard operation
b2c-crm-sync copied to clipboard

Getting Error while deploying the b2c connector in SFDC Sandbox

Open Sourabh-Bhandari opened this issue 3 years ago • 5 comments

Describe the bug Hi, I am trying to deploy this connector in my Sandbox. I have setup the env file as well with B2C Commerce Configuration Properties and Salesforce Platform Configuration Properties. While using this command " npm run crm-sync:sf:org:deploy " I am getting the following error With Error Status.

{ "stack": "RequiresDevhubUsernameError: This command requires a dev hub username. Specify it with the -v parameter or with the "sfdx config:set defaultdevhubusername=" command.\n at Function.create (C:\Users\A\Desktop\b2c\b2c-crm-sync\node_modules\@salesforce\core\lib\sfdxError.js:160:16)\n at UserDisplayCommand.assignHubOrg (C:\Users\A\Desktop\b2c\b2c-crm-sync\node_modules\@salesforce\command\lib\sfdxCommand.js:144:44)\n at async UserDisplayCommand.init (C:\Users\A\Desktop\b2c\b2c-crm-sync\node_modules\@salesforce\command\lib\sfdxCommand.js:235:13)\n at async UserDisplayCommand._run (C:\Users\A\Desktop\b2c\b2c-crm-sync\node_modules\@salesforce\command\lib\sfdxCommand.js:80:13)", "message": "This command requires a dev hub username. Specify it with the -v parameter or with the "sfdx config:set defaultdevhubusername=" command.", "name": "RequiresDevhubUsernameError", "exitCode": 1, "commandName": "UserDisplayCommand", "code": "Error" } ]

Your local environment details: Node version (node -v): v15.2.1 NPM version (npm -v): 7.0.8 SFDX version (sfdx -v) sfdx-cli/7.120.0 linux-x64 node-v15.2.1

Sourabh-Bhandari avatar Oct 25 '21 07:10 Sourabh-Bhandari

@Sourabh-Bhandari We need to set devhub username for deploying the code. Can you check if the below link helps? https://help.salesforce.com/s/articleView?id=sf.sfdx_setup_enable_devhub.htm&type=5 https://developer.salesforce.com/docs/atlas.en-us.sfdx_dev.meta/sfdx_dev/sfdx_dev_cli_usernames_orgs.htm

chandanrjit avatar Oct 25 '21 07:10 chandanrjit

Hi @chandanrjit, I am trying to deploy this connector in sandbox. And we can’t enable Dev Hub in a sandbox. Is there any other way to create a scratch org with Devhub user for Sandbox?

Sourabh-Bhandari avatar Oct 25 '21 08:10 Sourabh-Bhandari

It seems we can't enable the DevHub on sandbox . https://help.salesforce.com/s/articleView?id=sf.sfdx_setup_enable_devhub.htm&type=5 . I have tried it in one of the prod org for this. We need to see the options for Sandbox.

chandanrjit avatar Oct 25 '21 08:10 chandanrjit

Having similar issue. Can someone please share how to deploy to sandbox without enabling DevHub?

VALiNTRY360 avatar Nov 29 '21 14:11 VALiNTRY360

Same issue here. Deploying on sandbox, with person accounts, and getting the same error

mgeorgievSpinup avatar Jun 14 '22 13:06 mgeorgievSpinup