Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sfdx commerce:products:import fails with ENOENT file not found, yet running sfdx shane:data:file:upload on the exact same file does work. #195

Open
peterTrifecta opened this issue Mar 17, 2023 · 3 comments
Labels
ack Acknowledgement for the issue

Comments

@peterTrifecta
Copy link

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?

@github-actions
Copy link

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.

@peterTrifecta
Copy link
Author

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

@tarcang tarcang added the ack Acknowledgement for the issue label Mar 17, 2023
@alarrosa2
Copy link

I have the same issue even if the CMS content is created I can't see products on salesforce backend, no cms project is created in the backend

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ack Acknowledgement for the issue
Projects
None yet
Development

No branches or pull requests

3 participants