You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Getting errors when running "sfdx commerce:store:create": The \"-u\" flag has been deprecated. Use \"--target-org | -o\" instead.", "The \"--apiversion\" flag has been deprecated. Use \"--api-version\" instead.
#315
Open
forcepulsar opened this issue
May 15, 2024
· 0 comments
running the command sfdx commerce:store:create to create b2b sites I get error.
ERROR running StoreQuickstartSetup: {
"code": 1,
"context": "Create",
"commandName": "Create",
"message": "The requested resource does not exist",
"name": "NOT_FOUND",
"status": 1,
"stack": "NOT_FOUND: The requested resource does not exist\n at HttpApi.getError (/usr/local/lib/sf/node_modules/@jsforce/jsforce-node/lib/http-api.js:278:16)\n at process.processTicksAndRejections (node:internal/process/task_queues:95:5)\n at async /usr/local/lib/sf/node_modules/@jsforce/jsforce-node/lib/http-api.js:127:33\n at async Connection.create (/usr/local/lib/sf/node_modules/@jsforce/jsforce-node/lib/connection.js:719:15)\n at async Create.run (file:///usr/local/lib/sf/node_modules/@salesforce/plugin-data/lib/commands/data/create/record.js:48:24)\n at async Create._run (/usr/local/lib/sf/node_modules/@oclif/core/lib/command.js:311:22)\n at async Config.runCommand (/usr/local/lib/sf/node_modules/@oclif/core/lib/config/config.js:433:25)\n at async run (/usr/local/lib/sf/node_modules/@oclif/core/lib/main.js:92:16)",
"exitCode": 1,
"warnings": [
"The \"-u\" flag has been deprecated. Use \"--target-org | -o\" instead.",
"The \"--apiversion\" flag has been deprecated. Use \"--api-version\" instead."
],
"command": "sfdx force:data:record:create -u \"[email protected]\" -s \"ShippingConfigurationSet\" -v \"TargetRecordId=0ZEHy0000000KNUOA2\" --json --apiversion=57.0"
}
I managed to make it run myself by building the package locally and updating the file /src/lib/utils/sfdx/forceDataSoql.ts on line 56. Replaced the line:
running the command sfdx commerce:store:create to create b2b sites I get error.
I managed to make it run myself by building the package locally and updating the file /src/lib/utils/sfdx/forceDataSoql.ts on line 56. Replaced the line:
with the following (basically hardcoding the scratch name and using sf instead of sfdx):
Note the <> has to be hardcoded to the scratch org nickname
Then I ran the command and it worked
I created a blog post about it if it helps
The text was updated successfully, but these errors were encountered: