salesforcedx-vscode
salesforcedx-vscode copied to clipboard
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
Summary
I setup a project, pulled metadata down using the "Org Explorer". When I attempt to retrieve, deploy, etc any individual file, I get this error.
Steps To Reproduce:
- create new project
- Pull down an Apex class using org explorer (or manifest)
- Open class
- Right click ->
Retrieve Source from org
Expected result
The command should execute successfully.
Actual result
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
Additional information
I'm guessing it has something to do with the paths of the machine (it's a virtual desktop with network drives), but the error message doesn't provide details as to what paths it's receiving.
Commands against manifest still seem to work.
Salesforce Extension Version in VS Code: 59.17.0
SFDX CLI Version: 2.28.6
OS and version: Windows 10 Enterprise
VS Code version: 1.86.2
Definitely has to do with the VM drive... I modified the extension to actually log the path when this error occurs and I get something like this:
c:\SnapVolumesTemp\MountPoints\{6338b562-0000-0000-0000-100000000000}\{097ae86a-2c82-4ec6-924e-ed3da382c010}\SVROOT\Users\cjonas\Documents\project\force-app\main\default\objects\Account\fields\Branch_Fax_Number__c.field-meta.xml
when it should be expecting this:
c:\users\cjonas\Documents\project\force-app\main\default\objects\Account\fields\Branch_Fax_Number__c.field-meta.xml
I don't understand why these commands are getting this "raw" path, as other vscode commands have no problem getting the mapped path.
@ChuckJonas Thank you for bringing this to our attention. AFAIK I do not believe VM mapped drives are not supported. I will however log a bug and discuss with the team.
This issue has been linked to a new work item: W-15071711
Hi @ChuckJonas , are you still seeing the issue with the latest version? We fixed the same error due to a mapped folder (symbolic link) back in March.
@ChuckJonas , this issue should have been fixed. Please give this a try and reopen if you still see this with our latest version. Thank you for reporting this issue!