Cordobes
redirect?
[Vue Router warn]: Detected a possibly infinite redirection in a navigation guard when going from "/dashboard" to "/auth/login". Aborting to avoid a Stack Overflow.
Are you always returning a new location within a navigation guard? That would lead to this error. Only return when redirecting or aborting, that should fix this. This might break in production if not fixed.
10 replies
in development comments are fetching correctly, on production theres no fetch
const fetchComments = async () => {
try {
const { data } = await useAsyncData(
'comments',
() => $fetch('/api/v1/comments', {
method: 'GET',
params: {
sitekey,
post_id: postId,
hostname: referer
}
})
)
console.log(data)
const commentsArray = Array.isArray(data) ? data : (data as { comments: Comment[] })?.comments || []
comments.value = commentsArray.sort((a, b) => new Date(b.created_at).getTime() - new Date(a.created_at).getTime())
} catch (error) {
console.error('Error fetching comments:', error)
comments.value = []
}
}
fetchComments()
10 replies
supabase signup pass custom data
async function onSubmit(payload: FormSubmitEvent<Schema>) {
try {
const { error } = await supabase.auth.signUp({
email: payload.data.email,
password: payload.data.password
})
if (error) {
toast.add({ title: 'Error', description: error.message, color: 'error' })
} else {
toast.add({ title: 'Success', description: 'Logged in successfully', color: 'success' })
}
} catch (error: any) {
toast.add({ title: 'Error', description: error.message, color: 'error' })
}
}
how i can send username to supabase sign up auth
21 replies
Auth session missing!
export const isAuthenticated = async (event: any) => {
const { user, error } = await serverSupabaseUser(event);
if (error) {
console.log("Authentication error:", error);
return false;
}
if (!user) {
return false;
}
return user;
}
23 replies
build error
[ nuxi 03:54:50] ERROR Nuxt Build Error: [vite:vue] Could not load C:/Users/facun/OneDrive/Im\xE1genes/dialoge.pro/nodemodules/.pnpm/@[email protected]@babel+p_feda10ab9a76a4fe03faa6b620efb943/node_modules/@nuxt/ui-pro/dist/runtime/components/prose/Pre.vue?vue&type=style&index=0&lang.css?inline&used: ENOENT: no such file or directory, open 'C:\Users\facun\OneDrive\Im\xE1genes\dialoge.pro\nodemodules.pnpm@[email protected]@babel+p_feda10ab9a76a4fe03faa6b620efb943\node_modules@nuxt\ui-pro\dist\runtime\components\prose\Pre.vue'
7 replies
postcss error (tailwind)
Pre-transform error: [postcss] postcss-import: C:\Users\facun\OneDrive\Documentos\dialoge\node_modules\tailwindcss\lib\index.js:1:1: Unknown word "use strict"
Plugin: vite:css
File: C:/Users/facun/OneDrive/Documentos/dialoge/node_modules/tailwindcss/lib/index.js:1:0
1 | "use strict";
| ^
2 | module.exports = require("./plugin");
3 | (x2)
ℹ Vite server warmed up in 20874ms
19 replies