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
sfdx commerce:products:import --products-file-csv=./config/NorthernTrail.csv --store-name=D2C --type=b2c -u myscratch --apiversion=57.0
Importing products.
› Warning: sfdx-cli update available from 7.177.1 to 7.183.1.
› Warning: sfdx-cli update available from 7.177.1 to 7.183.1.
[Error: ENOENT: no such file or directory, open './config/NorthernTrail.csv'] {
errno: -2,
code: 'ENOENT',
syscall: 'open',
path: './config/NorthernTrail.csv'
}
ERROR running commerce:products:import: {
"status": 1,
"name": "Error",
"message": "form-data: ENOENT: no such file or directory, open './config/NorthernTrail.csv'",
"exitCode": 1,
"commandName": "Upload",
"stack": "Error: ENOENT: no such file or directory, open './config/NorthernTrail.csv'\nOuter stack:\n at SfdxError.wrap (/Users/peter.knolle/.local/share/sfdx/node_modules/@salesforce/core/lib/sfdxError.js:171:27)\n at Upload.catch (/Users/peter.knolle/.local/share/sfdx/node_modules/@salesforce/command/lib/sfdxCommand.js:248:67)\n at process.processTicksAndRejections (node:internal/process/task_queues:95:5)\n at async Upload._run (/Users/peter.knolle/.local/share/sfdx/node_modules/@salesforce/command/lib/sfdxCommand.js:85:13)\n at async Config.runCommand (/usr/local/lib/sfdx/node_modules/@oclif/core/lib/config/config.js:272:25)\n at async run (/usr/local/lib/sfdx/node_modules/@oclif/core/lib/main.js:74:5)",
"warnings": [],
"command": "sfdx shane:data:file:upload -f ./config/NorthernTrail.csv -u "test-0wvdfppshr61@example.com" --json --apiversion=57.0"
}
Importing products.... ⡿ Uploading...
Thank you for filing this issue. We appreciate your feedback and will review the issue as soon as possible. Remember, however, that GitHub isn't a mechanism for receiving support under any agreement or SLA. If you require immediate assistance, contact Salesforce Customer Support.
When I changed to use the absolute path it worked. Relative paths may not work. That should be noted if it's like that on purpose or fixed if it's a bug.
Running from the project root at /Users/peter.knolle/work/dev/project:
--products-file-csv=/Users/peter.knolle/work/dev/project/config/NorthernTrail.csv works
--products-file-csv=./config/NorthernTrail.csv does not work
sfdx commerce:products:import --products-file-csv=./config/NorthernTrail.csv --store-name=D2C --type=b2c -u myscratch --apiversion=57.0
Importing products.
› Warning: sfdx-cli update available from 7.177.1 to 7.183.1.
› Warning: sfdx-cli update available from 7.177.1 to 7.183.1.
[Error: ENOENT: no such file or directory, open './config/NorthernTrail.csv'] {
errno: -2,
code: 'ENOENT',
syscall: 'open',
path: './config/NorthernTrail.csv'
}
ERROR running commerce:products:import: {
"status": 1,
"name": "Error",
"message": "form-data: ENOENT: no such file or directory, open './config/NorthernTrail.csv'",
"exitCode": 1,
"commandName": "Upload",
"stack": "Error: ENOENT: no such file or directory, open './config/NorthernTrail.csv'\nOuter stack:\n at SfdxError.wrap (/Users/peter.knolle/.local/share/sfdx/node_modules/@salesforce/core/lib/sfdxError.js:171:27)\n at Upload.catch (/Users/peter.knolle/.local/share/sfdx/node_modules/@salesforce/command/lib/sfdxCommand.js:248:67)\n at process.processTicksAndRejections (node:internal/process/task_queues:95:5)\n at async Upload._run (/Users/peter.knolle/.local/share/sfdx/node_modules/@salesforce/command/lib/sfdxCommand.js:85:13)\n at async Config.runCommand (/usr/local/lib/sfdx/node_modules/@oclif/core/lib/config/config.js:272:25)\n at async run (/usr/local/lib/sfdx/node_modules/@oclif/core/lib/main.js:74:5)",
"warnings": [],
"command": "sfdx shane:data:file:upload -f ./config/NorthernTrail.csv -u "test-0wvdfppshr61@example.com" --json --apiversion=57.0"
}
Importing products.... ⡿ Uploading...
BUT THIS WORKS:
sfdx shane:data:file:upload -f ./config/NorthernTrail.csv -u test-0wvdfppshr61@example.com --json --apiversion=57.0
{
"status": 0,
"result": {
"attributes": {
"type": "ContentVersion",
"url": "/services/data/v57.0/sobjects/ContentVersion/06801000002BgndAAC"
},
"Id": "06801000002BgndAAC",
"ContentDocumentId": "06901000002C159AAC"
}
}
What's going on that the code in commerce:products:import doesn't work?
The text was updated successfully, but these errors were encountered: