Plugin cannot locate export.json in working directory.
Question
I followed the setup instructions and created the following export.json:
{
"objects": [
{
"query": "SELECT Id, Name FROM Account",
"operation": "Upsert",
"externalId": "Name"
}
]
}
I saved it in ./scripts, installed SFDMU successfully, and then ran:
$ sfdx sfdmu:run -sourceusername source -targetusername target -p ./scripts
I received this error:
Execution of the command sfdmu:run has been started.
Command in progress ...... done
[ERROR] Command initialization error: Missing export.json file in the working directory.
Execution of the command sfdmu:run has been finished. Exit code 2 (COMMAND_INITIALIZATION_ERROR).
Total time elapsed: 00h 00m 00s 005ms.
How can I resolve this?
Answer
The path passed to --path must point to a directory that contains export.json directly.
The file name must be exactly export.json.
Use an explicit path with the current CLI command:
$ sf sfdmu run --sourceusername source --targetusername target --path "./scripts"
If your script is in a different folder, pass that exact folder to --path.