vs-deploy
                                
                                
                                
                                    vs-deploy copied to clipboard
                            
                            
                            
                        [Help Wanted] [Error] Could not deploy file '<file>': Error: Could not get relative path for <file>
I have no idea what I'm doing wrong here. I went from a single folder workspace to a dual setup, one for dev, other for prd. Settings.json has both configurations, but I'm getting this error when I try to deploy a .jpg file inside /dev/img folder.
@joaociocca
Can you post an example of your settings?
Sorry, I forgot to do that and reverted to single folder... but I think I remember what I did, I can explain: base folder, something like C:\Project, contained a \dev and \prd folders. I opened them together on Code, and tried to setup two different targets - one for \dev deploy and the other for \prd, but when I tried to just deploy, nothing happened. Then I tried to deploy only that .jpg file, and the "Could not deploy" error showed up.
I'll see if I can get to that point again once I have some free time over here, then I'll post an example!
I have the same issue. Uploading from within a single project directory works ok, but when I move the directory into a workspace it errors with "Could not get relative path for.."
I can confirm this behaviour. I have a big workspace with more or less 30-40 folders in it. I'm trying to set up deployment but get the same error when trying to deploy:
[Error] Could not deploy file '<file>': Error: Could not get relative path for <file>
The <file> is the absolute path of the file.
My deploy-config inside of workspace's settings.js:
"deploy": {
        "packages": [
            {
                "name": "module",
                "description": "app module",
                "files": [
                    "src/**/*",
                    "bin/*",
                    "plugin/*"
                ],
                "deployOnChange": true,
                "targets": [
                    "local wmware"
                ],
                
            }
        ],
        "targets": [
            {
                "type": "sftp",
                "name": "local vmware",
                "description": "A SFTP folder",
                "host": "192.168.73.137",
                "port": 22,
                "user": "root",
                "password": "***",
                "dir": "/opt",
                "mappings": [
                    {
                        "source": "src/frontend",
                        "target": "/opt/app/frontend/modules/module"
                    }
                ]
            }
        ]
    }
Using this config inside the single module folder works fine.
Just tested. It works in deploy reloaded.