1

When I create a scratch org I always encounter an error while pushing the source to the generated scratch org mentioned their was an error in the Layout and translations using Intellij(Installed sfdx cli). I have tried several time and all the time it shows the same error even without changing anything. The point here I need to mention that I have two different source for the same project for some reason. I have opened those two sources from the same Intellij and created scratch org's to test. Suddenly today I can't able to create scratch org. Did anyone experienced the same issue before?

1

I suspect the issue here is because of the Intellij cache. When I rebuild the Intellij by,

File -> Invalidate Caches/ Restart... -> Invalidate and Restart

I could able to create the scratch org with the same source without any error. Maybe in the local system it conflicts the files with the two separate projects(I am not sure but suspect).

0

You can inform SFDX that there are multiple sets of components in your sfdx-project.json file so that SFDX pushes all the parts in one go e.g.:

{
    "packageDirectories": [
        {
            "path": "sfdx-source/wiz/main",
            "default": true
        },
        {
            "path": "sfdx-source/wiz/test"
        },
        {
            "path": "sfdx-source/int/main"
        },
        {
            "path": "sfdx-source/int/test"
        }
    ],
    "namespace": "yourNamespace",
    "sfdcLoginUrl": "https://login.salesforce.com",
    "sourceApiVersion": "43.0"
}

See Salesforce DX Project Configuration.

  • It's already there in the project json file. The issue here because of the Intellij cache. I have used Intellij for two separate project and using those source I created scratch orgs using the same dev hub Account. When I rebuild the Intellij the issue gone and I can able to create the scratch org using the same source. – Hariprasath May 6 at 10:38
  • 1
    Hi @Hariprasath, Glad you've figured it out. Didn't stand out to me in your question that the problem was specific to Intellij. – Keith C May 6 at 10:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.