function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Ed WomackEd Womack 

Trailhead "Build Your First Unlocked Package JSON error"

Hello, I'm going through the Trailhead "Build Your First unlocked Package" and everything has worked fine up until when I tried the following CLI command: 

sfdx force:package:create --name dreamhouse --description "My Package" --packagetype Unlocked --path force-app --nonamespace --targetdevhubusername DevHub

When I enter this line the CLI consistently displays "Unexpected token } in JSON at position 239" - I had a look through all of the possible json files in the directories uploaded from GitHub, but everything looked okay. My Dev Org is using API 44. This error message gives me very little information - has anyone seen and resolved this one before?
Prakash Rai 7Prakash Rai 7
Can you post your sfdx-project.json?
Ed WomackEd Womack
I believe this is the one:
{
    "packageDirectories": [
        {
            "path": "force-app",
            "default": true
        }
    ],
    "namespace": "",
    "sfdcLoginUrl": "https://login.salesforce.com",
    "sourceApiVersion": "44.0"
    }
}
Prakash Rai 7Prakash Rai 7
You have one extra "}" at the end.  FYI https://jsonlint.com/ helps to validate JSON.