0

While creating a version for the package2 , I am running into errors

example of the errors :Unknown config name "packageDirectories". Unknown config name "namespace".

Following is the content of the sfdx-config.json

{
     "packageDirectories": [        
     {
            "path": "force-app", "default": true,
            "id": "0Ho1p0000004C93CAE",
            "versionName": "None",
            "versionDescription": "None",
            "versionNumber": "None",
            "dependencies": "None"
},        
    {
            "path": "force-app", "default": true        },
    {
            "path": "force-app",
            "default": true,
            "id": "<package2 id 0Ho1p0000004C93CAE>",
            "versionName": "Summer 17 Rel",
            "versionDescription": "Common Package",
            "versionNumber": "1.3.0.NEXT",
            "ancestorId": "None",
            "features": "None",
            "orgPreferences": 
            {
                "enabled": [
                    "S1DesktopEnabled",
                    "NetworksEnabled",
                    "Translation"    
                ],
                "disabled": [] 
        }
    }   ],

     "namespace": "",
     "sfdcLoginUrl": "https://login.salesforce.com",
     "sourceApiVersion": "42.0"
}

1 Answer 1

1

You can't specify the same path more than once, and you can't set more than one path as default. I suspect that you're simply confusing the system and the errors you're getting are just a byproduct of confusing the system. Try cleaning everything up and trying again. Make sure you use unique path names, and set exactly one as default.

3
  • Thanks @sfdcfox for your reply , I have cleaned up the the json and it looks like below.{ "namespace": "", "sfdcLoginUrl": "login.salesforce.com", "sourceApiVersion": "42.0", "packageDirectories": [ { "path": "force-app", "default": true, "id": "0Ho1p0000004C93CAE", "versionName": "None", "versionDescription": "None", "versionNumber": "None", "dependencies": "None" } ] } May 12, 2018 at 14:28
  • With the above json , am still running into the error unknown config name "namespace" May 12, 2018 at 14:29
  • @achilles3339 I think you can remove the namespace, since you're not using it.
    – sfdcfox
    May 12, 2018 at 15:52

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .