-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[🐞] Azure/SWA: local preview not working (v3 / v4 conflict in SWA CLI app, workaround included) #7158
Comments
OK, after several days of debugging and searches, I think I found the root cause. I am leaving this here as an update, hoping that someone else may find it useful in the future. TL;DR: ignore the errors about v4 in Recap: the Qwik adapter relies on the SWA CLI app, which deploys Static Web Applications on Azure, which, despite the name, aren't necessarily fully static, but may have an API with cloud functions. The Qwik adapter executes an additional Vite build to produce a bundle in I was getting the error above because SWA downloads the latest function tools (currently v4) for I spent some time to migrate the Qwik adapter to v4 locally and was eventually able to get the local previews to work. At the same time, however, I realized that the deployments to Azure were no longer working. As it turns out, v4 of the functions API has been "GA" for over a year now, and most Azure products (including the Functions App) do in fact use v4 as the default by now, and while SWA only works with v4 locally, it still relies on v3 during deployments. The implementation of v4 support for deployments is still pending. |
Should a developer want to migrate the Azure SWA adapter to v4, the following may be of help. -- official v3 -> v4 migration guide --
--
--
-- Middleware has to use new types, in particular for The order of Headers are now supplied in a different structure.
-- A new
|
Which component is affected?
Qwik Runtime
Describe the bug
Having installed the azure-swa adapter and successfully built the app, I am unable to preview it locally using
npx swa start
.The server is running, but with mixed results:
/
and for/index.html
it responds a 404robots.txt
ormanifest.json
are correctly deliveredReproduction
npm run build
npx swa start
System Info
Additional Information
No response
The text was updated successfully, but these errors were encountered: