-
Notifications
You must be signed in to change notification settings - Fork 512
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
Unable to use fetch API on Azure Static web apps #2676
Comments
When using the exact example from the docs, it also works
When using
I configured I think you are not using fetch correct, as your reproduction already fails in stackblitz. Please check the docs about native fetch: EDIT: Changed ordering of examples to make it more clear. |
@itpropro by your testing, if you avoid import, do you reproduce issue or not? |
It could also be a fetch keyword error caused by a packaging issue, but I may have time to track this down later |
The second version I tested was without any imports, the ofetch one was only for the sake of testing, I should have ordered them the other way around. Both work in Static Web Apps. |
Okay, then it is most certainly a rollup chunk ordering issue. @censujiang If can still reproduce, do you think you can share a public repository? (Nuxt setup is also acceptable in this case since it might be also needed for reproduction) If it is not reproducible anymore I would suggest closing the issue in the meanwhile. |
I'd like to provide a Nuxt/Nitro repository that can be used for reproduction, but I'm currently on the Chinese National Day public holiday, so it's not convenient for now. I'll talk about it after the holiday. |
No hurry thanks @censujiang! |
Environment
node:20 in azure static web apps
Reproduction
https://stackblitz.com/edit/github-p3avvp?file=server%2Froutes%2Findex.ts
Describe the bug
In this product environment of Azure, even if it is set to node:20, it still does not include the fetch api
nuxt/nuxt#28611
Additional context
A valid Azure subscription is required to test Static web apps. This error only occurs in the cloud, not in the local simulator.
Logs
The text was updated successfully, but these errors were encountered: