SalesforceCommerceCloud / b2c-crm-sync

... a contemporary perspective on how to integrate B2C Commerce and the Salesforce Customer 360 Platform to power frictionless customer experiences in the B2C domain.
https://salesforcecommercecloud.github.io/b2c-crm-sync/
BSD 3-Clause "New" or "Revised" License
64 stars 47 forks source link

Getting Error while deploying the b2c connector in SFDC Sandbox #50

Open Sourabh-Bhandari opened 2 years ago

Sourabh-Bhandari commented 2 years ago

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

chandanrjit commented 2 years ago

@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

Sourabh-Bhandari commented 2 years ago

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?

chandanrjit commented 2 years ago

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.

VALiNTRY360 commented 2 years ago

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

mgeorgievSpinup commented 2 years ago

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