People landing here due to google search may have above error due to other reasons.
This Answer talks to the "No source backed components present in the package" error, due to retrieve deploy bug.
So...
If you retrieve just the File, the folder will be present in the source, because that is the correct structure.
but the folder metadata could be missing, if you only retrieved the file.
See pic add the folder to the package.xml
However...
I retrieved both file and folder, but it failed deploy too, with a "not found in the Zipped directory" error.
This was because I retrieved with the extension in the package.xml which worked, but the extension is not wanted on deploy.
I do feel this is a bug due to the need for various extensions should be allowed.
- you must retrieve file and folder, to be able to deploy a new file in a new folder.
- you must not deploy with the file extension in the Package.xml, otherwise you get a "An object '' of type '' was named in package.xml, but was not found in zipped directory" error.
- this may change.
- if you experience these errors try a few different setups because sfdx could change how it behaves.
Here is my failure example
My example is for documents but the error was the same, other may land here too.
https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_document.htm