Azure / static-web-apps

Azure Static Web Apps. For bugs and feature requests, please create an issue in this repo. For community discussions, latest updates, kindly refer to the Discussions Tab. To know what's new in Static Web Apps, visit https://aka.ms/swa/ThisMonth
https://aka.ms/swa
MIT License
330 stars 56 forks source link

SWA function level `admin` not allowed? #672

Open dfberry opened 2 years ago

dfberry commented 2 years ago

Why am I getting an error about admin level auth not allowed? I'm trying to find the doc that let's me know why?

> api@1.0.0 build /github/workspace/api
> npm run clean && tsc

> api@1.0.0 clean /github/workspace/api
> npm cache clean --force

npm WARN using --force I sure hope you know what you are doing.

Copy '/github/workspace/api/node_modules' with all dependencies to '/github/workspace/api/.oryx_all_node_modules'...

Copying production dependencies from '/github/workspace/api/.oryx_prod_node_modules/node_modules' to '/github/workspace/api/node_modules'...
Preparing output...

Copying files to destination directory '/bin/staticsites/ss-oryx/api'...
Done in 1 sec(s).

Removing existing manifest file
Creating a manifest file...
Manifest file created.

Done in 16 sec(s).

---End of Oryx build logs---
Function Runtime Information. OS: linux, Functions Runtime: ~3, node version: 12
Finished building function app with Oryx
Error in processing api build artifacts: the file 'status/function.json' specifies an invalid authLevel. Allowed authLevels: anonymous, function.

For further information, please visit the Azure Static Web Apps documentation at https://docs.microsoft.com/en-us/azure/static-web-apps/
If you believe this behavior is unexpected, please raise a GitHub issue at https://github.com/azure/static-web-apps/issues/
Exiting
JayQuerido commented 1 year ago

I've just run into the same problem, but using Functions Runtime ~4, node version 18. All docs suggest "admin" is a valid value.

Did you find any solution, @dfberry ?

0xfacad3 commented 1 year ago

I am also facing the same problem.