6

Facing below issue in Jenkins Deployment from yesterday(It was working fine till yesterday). Can you please suggest a solution to resolve this issue?

  • sfdx force:source:deploy -p ./deploy-sf -l NoTestRun --verbose --loglevel fatal -u [email protected]

› Warning: sfdx-cli update available from 7.78.1 to 7.80.0.

Using specified username [email protected]

ERROR running force:source:deploy: InvalidPackageDirectory

script returned exit code 1

The sfdx-project.json looks like:

{
  "packageDirectories": [
    {
      "path": "force-app",
      "default": true
    },
    {
      "path": "deploy-sf",
      "default": false
    }
  ],
  "namespace": "",
  "sfdcLoginUrl": "login.salesforce.com",
  "sourceApiVersion": "47.0"
}
3
  • sfdx-project.json: { "packageDirectories": [ { "path": "force-app", "default": true }, { "path": "deploy-sf", "default": false } ], "namespace": "", "sfdcLoginUrl": "login.salesforce.com", "sourceApiVersion": "47.0" }
    – Ashok
    Nov 13, 2020 at 6:05
  • What's the output from tail ~/.sfdx/sfdx.log? There should be a clue to help you there.
    – sfdcfox
    Nov 13, 2020 at 6:30
  • 2
    There is an unwanted path "deploy-sf" in sfdx-project.json file, I removed that path and tried deployment, it worked :)
    – Ashok
    Nov 13, 2020 at 12:22

2 Answers 2

6

I just got the same error and was puzzled myself as to why it stopped working all of a sudden when I haven't changed the sfdx-project.json at all. It turned out that I deleted one of the folders mentioned in the packageDirectories.

I'm assuming the same happened to you and you deleted the deploy-sf folder without removing it from the sfdx-project.json file.

1

In my case, the name of directory in packageDirectories and actual directory on the disk was slighty different, when I fixed the typo, the error has gone

You must log in to answer this question.

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