Prompt error deploying or retrieving source when vscode pulls the code
When sfdx: retrieve this source from org is executed, the following information is prompted:
Error deploying or retrieving source: 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
resolvent
Open the sfdx project. JSON
configuration file (in the root directory or Ctrl + P search)
Add the following elements to the "packagedirectories"
attribute array of the configuration file:
{
"path": "XXX",
"default": false
}
Note that path is the directory (root directory) where the file you want to pull is located. For example, the root directory of your file is called “functional”, and XXX here will fill in functional
.
Save after adding, and then pull the file again.