static-web-apps-cli
static-web-apps-cli copied to clipboard
swa deploy - Cannot see logs when there's an error
Before filing this issue, please ensure you're using the latest CLI by running swa --version
and comparing to the latest version on npm.
Trying to use swa deploy. It's failing but it's not possible to see the details of the deployment. It just shows An unknown error has occurred
.
![image](https://user-images.githubusercontent.com/3982077/171911107-0539e187-db20-432d-ad63-bbaf3e9336d5.png)
Hey @anthonychu, Is this related to #500? Could you confirm if you tried the steps mentioned there? We are investigating the fix currently, but need more clarity on whether the error we see in your case is different from that mentioned in the #500 issue or not. Thanks!
cc// @sgollapudi77
@anthonychu @Reshmi-Sriram I am experiencing the same An unknown exception has occured
at the same moment as mentioned here https://github.com/Azure/static-web-apps-cli/issues/500#issuecomment-1132738190
Hey @anthonychu , is it possible to share your repo? I'm also facing the same issue and I want to confirm if the same is happening for you also.
There are two cases,
** Case 1 ** : Folder structure looks something like this and tried 'swa deploy ./app --api-location ./api' -> Deploy works fine
- /src
- /api
- /app
- index.html
- index.js
** Case 2 ** : Folder structure looks like this and tried 'swa deploy . --api-location ./api' -> Deploy fails with Unknown exception occured
- /src
- /api
- index.html
- index.js
Hey, we're experiencing the same error on our end too and this issue is being actively worked on. But fortunately, we have a workaround for this. If you're deploying from the root folder where your app contents are present, please try creating a folder for app_location and dump your static contents in that folder and do 'swa deploy'.
We also documented the same here.
I need the same error report, but I am running in Docker, which is related to the file permissions. It should be that new files cannot be created during compression
@sgollapudi77 to your point, I'm encountering this issue when trying to deploy my built (/dist) folder from SWA CLI. The repo is https://github.com/thomasgauvin/solidjs-starter, no API functions. The command I'm executing is swa deploy ./dist
Funnily enough, it worked the first time I submitted the deployment, but when I wanted to redeploy, it gave me the error.
I am encountering the same as https://github.com/Azure/static-web-apps-cli/issues/557