I'm trying to update an unmanaged package that I've been developing and am running into the following error when running the following command:

sfdx force:package:version:create -p SomePackage -d force-app -k test1234 --wait 10 -v myclient-prod --codecoverage

No matching source was found within the package root directory: C:\Users\someuser\Dropbox\vscode_workspace\myclient\force-app

I tried reverting to a previous version of sfdx-cli, verifying that I have source in the correct paths, etc. I also reverted to a version that a user said worked for him here: https://developer.salesforce.com/forums/?id=9062I000000IWlmQAG, but that didn't help. I uninstalled & reinstalled, no luck. I have been able to create new versions in the past, so I don't think it's a config issue.

Just in case, here's my sfdx-config:

    "packageDirectories": [
            "path": "force-app",
            "default": true,
            "package": "SomePackage",
            "versionName": "ver 0.1",
            "versionNumber": "0.1.9.NEXT"
    "namespace": "",
    "sfdcLoginUrl": "https://login.salesforce.com",
    "sourceApiVersion": "51.0",
    "packageAliases": {
        "SomePackage": "0Ho4x0000...",
        "[email protected]": "04t...",
        "[email protected]": "04t4x0000...",
        "[email protected]": "04t4x0000...",
        "[email protected]": "04t4x0000...",
        "[email protected]": "04t4x00...",
        "[email protected]": "04t4x...",
        "[email protected]": "04t4x0..AO",
        "[email protected]": "04t4x0000...",
        "[email protected]": "04t4x00...",
        "[email protected]": "04t4x000..."

Based on one of the comments below, I'm adding my .forceignore:

# List files or directories below to ignore them when running force:source:push, force:source:pull, and force:source:status
# More information: https://developer.salesforce.com/docs/atlas.en-us.sfdx_dev.meta/sfdx_dev/sfdx_dev_exclude_source.htm


# LWC configuration files

# LWC Jest



I don't see anything there that should prevent this from running. Does anyone else?

ls force-app/main/default

  • I wonder: are you allowed to create patch versions for unmanaged packages?
    – Phil W
    Apr 5, 2021 at 10:39
  • @PhilW Thanks for the comment. Yes, it's possible. Note the previous versions in the sfdx-config file.
    – hgolov
    Apr 5, 2021 at 17:20
  • Great. I only asked since I know 2GP is like 1GP for managed packages- you can only create patch releases for security reviewed packages.
    – Phil W
    Apr 5, 2021 at 17:40
  • can you try same from CLI(not going to VS code at all). Ideally it should initiate the process for creating package. There may be some issues occur, but not this particular issue.
    – Ysr Shk
    Apr 7, 2021 at 5:59
  • 1
    I had the very same problem when I messed up with my folders. Can you execute "ls C:\Users\someuser\Dropbox\vscode_workspace\myclient\force-app" or display what is content of C:\Users\someuser\Dropbox\vscode_workspace\myclient\force-app folder?
    – Patlatus
    Apr 14, 2021 at 13:31


You must log in to answer this question.

Browse other questions tagged .