swaConfigLocation doesn't seem to be building the path to the configuration file properly. I have placed both SWA and SWA CLI configuration files on the folder my-folder, and run
swa deploy --config my-folder/swa-cli.config.json
swa-cli.config.json has a deploy section with the property swaConfigLocation.
If I set "swaConfigLocation": "." or "swaConfigLocation": "./" then I get the error ENOENT: no such file or directory because it tries to find the file at <path-to-project>\staticwebapp.config.json instead of <path-to-project>\my-folder\staticwebapp.config.json. That is, it is using the parent folder instead of my-folder. This was not the case in earlier versions of SWA CLI.
If I set "swaConfigLocation": "my-folder" or "swaConfigLocation": "./my-folder" then I get an ENOENT: no such file or directory error because it tries to find the file at <path-to-project>\my-folder\my-folder. On this occasion, swaConfigLocation is appended to my-folder instead of the parent folder (as opposed to what happens in the previous example).
If I set "swaConfigLocation": "staticwebapp.config.json" or "swaConfigLocation": "./staticwebapp.config.json", then the path seems right <path-to-project>\my-folder\staticwebapp.config.json, but I get an ENOTDIR: not a directory error, because it is expecting a folder rather than a file.
So there seem to be an inconsistency regarding the use of the parent vs my-folder directory. I am using Windows 11 and Azure Static Web Apps CLI 2.0.8. In earlier versions of SWA CLI I always used "swaConfigLocation": "." and never had this problem.
Could you please provide some advise?
swaConfigLocation doesn't seem to be building the path to the configuration file properly. I have placed both SWA and SWA CLI configuration files on the folder
my-folder, and runswa deploy --config my-folder/swa-cli.config.jsonswa-cli.config.json has a
deploysection with the propertyswaConfigLocation.If I set
"swaConfigLocation": "."or"swaConfigLocation": "./"then I get the errorENOENT: no such file or directorybecause it tries to find the file at<path-to-project>\staticwebapp.config.jsoninstead of<path-to-project>\my-folder\staticwebapp.config.json. That is, it is using the parent folder instead ofmy-folder. This was not the case in earlier versions of SWA CLI.If I set
"swaConfigLocation": "my-folder"or"swaConfigLocation": "./my-folder"then I get anENOENT: no such file or directoryerror because it tries to find the file at<path-to-project>\my-folder\my-folder. On this occasion, swaConfigLocation is appended tomy-folderinstead of the parent folder (as opposed to what happens in the previous example).If I set
"swaConfigLocation": "staticwebapp.config.json"or"swaConfigLocation": "./staticwebapp.config.json", then the path seems right<path-to-project>\my-folder\staticwebapp.config.json, but I get anENOTDIR: not a directoryerror, because it is expecting a folder rather than a file.So there seem to be an inconsistency regarding the use of the parent vs
my-folderdirectory. I am using Windows 11 and Azure Static Web Apps CLI 2.0.8. In earlier versions of SWA CLI I always used"swaConfigLocation": "."and never had this problem.Could you please provide some advise?