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

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.

| improve this answer | |
  • 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" } ] } – achilles3339 May 12 '18 at 14:28
  • With the above json , am still running into the error unknown config name "namespace" – achilles3339 May 12 '18 at 14:29
  • @achilles3339 I think you can remove the namespace, since you're not using it. – sfdcfox May 12 '18 at 15:52

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.