timmaier
timmaier
NNuxt
Created by timmaier on 9/6/2024 in #❓・help
Nuxt build error (At least one <template> or <script> is required in a single file component)
After upgrading with nuxi upgrade --force. On cloudflare pages the error looks like this:
[error] Nuxt Build Error: [vite:vue] [plugin vite:vue] node_modules/.pnpm/@[email protected][email protected][email protected][email protected][email protected][email protected]/node_modules/@nuxt/ui-pro/modules/pro/runtime/components/global/Callout.vue?nuxt_component=async&nuxt_component_name=Callout&nuxt_component_export=default: At least one <template> or <script> is required in a single file component. /opt/buildhome/repo/node_modules/.pnpm/@[email protected][email protected][email protected][email protected][email protected][email protected]/node_modules/@nuxt/ui-pro/modules/pro/runtime/components/global/Callout.vue
[error] Nuxt Build Error: [vite:vue] [plugin vite:vue] node_modules/.pnpm/@[email protected][email protected][email protected][email protected][email protected][email protected]/node_modules/@nuxt/ui-pro/modules/pro/runtime/components/global/Callout.vue?nuxt_component=async&nuxt_component_name=Callout&nuxt_component_export=default: At least one <template> or <script> is required in a single file component. /opt/buildhome/repo/node_modules/.pnpm/@[email protected][email protected][email protected][email protected][email protected][email protected]/node_modules/@nuxt/ui-pro/modules/pro/runtime/components/global/Callout.vue
19 replies
NNuxt
Created by timmaier on 6/1/2023 in #❓・help
sendRedirect not redirecting to page in ssr
Hey I have a nuxt 3 SSR project and have a server POST api route /api/login In my actual project there are a bunch of network requests that are run in the eventHandler (csrf, login, session) when useFetch('api/login') is called via client. Where my problem sits is with the last call in this file: sendRedirect(event, '/listing/create') I would expect my frontend to route to this page but it doesn't. Only after refreshing is my user in a "logged in state" I thought maybe my auth/session managment had a bug but I recreated a minimmal repo in stackblitz and the problem persist there without the auth/session managment. https://stackblitz.com/edit/github-rsjc9z?file=server%2Fapi%2Flogin.post.ts I'm new to SSR and nuxt so maybe there's something I've missed. Thanks for any help.
2 replies