Reputation: 13
I'm trying to run nuxt3 out-of-the-box in Azure Static Web Apps, but it always runs into error about @nuxt/kit not installed. It's just for my own study, I did almost the same in Vercel with React+Next and it works like a charm
Steps:
Created an Azure Static App for node, linked to github
Created nuxt app: (npx nuxi init nuxt3-app) https://v3.nuxtjs.org/getting-started/installation
Changed output in workflow yml: https://v3.nuxtjs.org/docs/deployment/azure
Created empty .gitkeep inside output/server
Repo: https://github.com/betonogueira/pessoalnuxt3
PS: If I install and then uninstall @nuxt/kit the same error begin to occur in development environment
Running 'npm run build'...
> @ build /github/workspace
> nuxt build
[log] Nuxt CLI v3.0.0-27238235.a1bcc53
[error] nuxi requires `@nuxt/kit` to be installed in your project. Try installing `nuxt3` or
`@nuxt/bridge` first.
at loadKit (node_modules/nuxt3/node_modules/nuxi/dist/chunks/kit.mjs:44:13)
at Object.invoke (node_modules/nuxt3/node_modules/nuxi/dist/chunks/build.mjs:23:43)
at _main (node_modules/nuxt3/node_modules/nuxi/dist/chunks/index.mjs:417:17)
Upvotes: 0
Views: 1758
Reputation: 1485
Static Web Apps do not work right now, but if you deploy it to an Azure Function, it does work there. I beat my head against this the last few days.
Essentially... Static Web Apps do not have a high enough Node version right now.
Upvotes: 0