Error deploying or retrieving source

I have newly created a project then created a random LWC page and right click on it and deploy and it is giving me below error

The file or directory that you tried to deploy or retrieve isn’t in a
package directory that’s specified in your sfdx-project.json file. Add
this location to your “packageDirectories” value, or deploy or
retrieve a different file or directory. For details about
sfdx-project.json, see:
You can run SFDX: Deploy Source to Org only on a source file or

Below is my sfdx-project.json

  "packageDirectories": [
      "path": "force-app",
      "default": true
  "name": "myproject",
  "namespace": "",
  "sfdcLoginUrl": "",
  "sourceApiVersion": "55.0"

Error deploying or retrieving source


Thank you for visiting the Q&A section on Magenaut. Please note that all the answers may not help you solve the issue immediately. So please treat them as advisements. If you found the post helpful (or not), leave a comment & I’ll get back to you as soon as possible.

Method 1

The issue you are seeing is related to the recently published version v55.4.0 of the Salesforce Extension for VS Code.

Multiple users are impacted by this.You can follow for updates.

The workaround for now, would be to downgrade the “Salesforce CLI Integration” extension version.

I will keep this thread updated as I have more inputs from our concerned Salesforce product development team.

As a fix, v55.4.1 of the Salesforce Extension for VS Code has been published. See the release notes here:

All methods was sourced from or, is licensed under cc by-sa 2.5, cc by-sa 3.0 and cc by-sa 4.0

0 0 votes
Article Rating
Notify of

Inline Feedbacks
View all comments
Would love your thoughts, please comment.x