Skip to content
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 #7158

Open
rondonjon opened this issue Dec 13, 2024 · 0 comments
Open

[🐞] Azure/SWA: local preview not working #7158

rondonjon opened this issue Dec 13, 2024 · 0 comments
Labels
STATUS-1: needs triage New issue which needs to be triaged TYPE: bug Something isn't working

Comments

@rondonjon
Copy link

rondonjon commented Dec 13, 2024

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.

> npx swa start

Welcome to Azure Static Web Apps CLI (1.1.10)

Using configuration "qwik-app" from file:
  .....\qwik-swa-repro\swa-cli.config.json

***********************************************************************
* WARNING: This emulator may not match the cloud environment exactly. *
* Always deploy and test your app in Azure.                           *
***********************************************************************

[api] Can't determine project language from files. Please use one of [--dotnet-isolated, --dotnet, --javascript, --typescript, --java, --python, --powershell, --custom]
[api] Can't determine project language from files. Please use one of [--dotnet-isolated, --dotnet, --javascript, --typescript, --java, --python, --powershell, --custom]
[api] Can't determine project language from files. Please use one of [--dotnet-isolated, --dotnet, --javascript, --typescript, --java, --python, --powershell, --custom]
[api]
[api] Azure Functions Core Tools
[api] Core Tools Version:       4.0.6280 Commit hash: N/A +421f0144b42047aa289ce691dc6db4fc8b6143e6 (32-bit)
[api] Function Runtime Version: 4.834.3.22875
[api]
[api] Can't determine project language from files. Please use one of [--dotnet-isolated, --dotnet, --javascript, --typescript, --java, --python, --powershell, --custom]
[api] Can't determine project language from files. Please use one of [--dotnet-isolated, --dotnet, --javascript, --typescript, --java, --python, --powershell, --custom]
[api] Can't determine project language from files. Please use one of [--dotnet-isolated, --dotnet, --javascript, --typescript, --java, --python, --powershell, --custom]
[api] [2024-12-13T16:11:30.848Z] The 'FUNCTIONS_WORKER_RUNTIME' setting is required. Please specify a valid value. See https://go.microsoft.com/fwlink/?linkid=2257963 for more information. The application will continue to run, but may throw an exception in a future release.
[api] [2024-12-13T16:11:30.896Z] No job functions found. Try making your job classes and methods public. If you're using binding extensions (e.g. Azure Storage, ServiceBus, Timers, etc.) make sure you've called the registration method for the extension(s) in your startup code (e.g. builder.AddAzureStorage(), builder.AddServiceBus(), builder.AddTimers(), etc.).
[api] For detailed output, run func with --verbose flag.
[swa]
[swa] Found configuration file:
[swa]   .....\qwik-swa-repro\public\staticwebapp.config.json
[swa]
[swa]
[swa] Serving static content:
[swa]   .....\qwik-swa-repro\dist
[swa]
[swa] Serving API:
[swa]   .....\qwik-swa-repro\azure-functions
[swa]
[swa] Azure Static Web Apps emulator started at http://localhost:4280. Press CTRL+C to exit.
[swa]
[swa]
[api] [2024-12-13T16:11:35.849Z] Host lock lease acquired by instance ID '000000000000000000000000464D5A11'.
[swa] GET http://127.0.0.1:7071/api/render (proxy)
[swa] GET http://localhost:4280/api/render - 404

The server is running, but with mixed results:

  • for / and for /index.html it responds a 404
  • some static files like robots.txt or manifest.json are correctly delivered
  • overall the app isn't working

Reproduction

System Info

System:
    OS: Windows 11 10.0.22631
    CPU: (32) x64 AMD Ryzen 9 7945HX with Radeon Graphics
    Memory: 15.17 GB / 31.19 GB
  Binaries:
    Node: 20.18.1 - C:\Program Files\nodejs\node.EXE
    npm: 10.8.2 - C:\Program Files\nodejs\npm.CMD
  Browsers:
    Edge: Chromium (127.0.2651.74)
    Internet Explorer: 11.0.22621.3527
  npmPackages:
    @builder.io/qwik: ^1.11.0 => 1.11.0
    @builder.io/qwik-city: ^1.11.0 => 1.11.0
    typescript: 5.4.5 => 5.4.5
    undici: * => 7.1.0
    vite: 5.3.5 => 5.3.5

Additional Information

No response

@rondonjon rondonjon added STATUS-1: needs triage New issue which needs to be triaged TYPE: bug Something isn't working labels Dec 13, 2024
@rondonjon rondonjon reopened this Dec 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
STATUS-1: needs triage New issue which needs to be triaged TYPE: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant