You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
When I run swa deploy or swa I get a JSON validation error, even my JSON's config files for the staticwebapp-config.json are all valid json.
With this state I can not deploy a SWA with a config.
To Reproduce
Place a json with the name "staticwebapp.config.json" in our "app" folder with the content {}
Run swa deploy
The following error occurs on my end:
WARNING: Failed to read staticwebapp.config.json configuration from:
C:\folder1\folder2\folder3\client\staticwebapp.config.json
✖ The following error was encountered: Unexpected token '', "{}" is not valid JSON
Please fix the above error and try again to load and use the configuration.
Read more: https://aka.ms/swa/config-schema
At this state the staticwebapp.config.json only contains {}
But I tried configurations like the this one, and they not working too.
The problem is the following:
The JSON parser only accepts hardcoded UTF-8 and not UTF-8 with BOM for example.
I think It is needed, that the JSON parsers tries multiple encodings.
SWA Version: 2.0.4
Describe the bug
When I run swa deploy or swa I get a JSON validation error, even my JSON's config files for the staticwebapp-config.json are all valid json.
With this state I can not deploy a SWA with a config.
To Reproduce
{}
swa deploy
The following error occurs on my end:
WARNING: Failed to read staticwebapp.config.json configuration from:
C:\folder1\folder2\folder3\client\staticwebapp.config.json
✖ The following error was encountered: Unexpected token '', "{}" is not valid JSON
Please fix the above error and try again to load and use the configuration.
Read more: https://aka.ms/swa/config-schema
At this state the staticwebapp.config.json only contains
{}
But I tried configurations like the this one, and they not working too.
Error Message:
✖ The following error was encountered: Unexpected token '', "{
"na"... is not valid JSON
Expected behavior
Deployment Working
Desktop (please complete the following information):
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: