Cesxhin
Cesxhin
NNuxt
Created by Cesxhin on 11/15/2024 in #❓・help
Launch command build and falls during Nuxt Nitro server
<--- Last few GCs ---> [23471:0x7fef53300000] 178952 ms: Scavenge 2017.5 (2066.1) -> 2017.2 (2077.1) MB, 7.45 / 0.00 ms (average mu = 0.458, current mu = 0.278) allocation failure; [23471:0x7fef53300000] 178968 ms: Scavenge 2024.7 (2077.4) -> 2024.9 (2077.9) MB, 7.16 / 0.00 ms (average mu = 0.458, current mu = 0.278) allocation failure; [23471:0x7fef53300000] 180278 ms: Scavenge 2025.5 (2077.9) -> 2024.6 (2099.9) MB, 1309.32 / 0.00 ms (average mu = 0.458, current mu = 0.278) allocation failure; <--- JS stacktrace ---> FATAL ERROR: Reached heap limit Allocation failed - JavaScript heap out of memory How detected error?
5 replies
NNuxt
Created by Cesxhin on 11/8/2024 in #❓・help
How can I manually add in nitro registry for public folder?
I have this file which will be present in the public folder which however will only be visible after mounting a volume from docker. I noticed that during the build it is somehow kept track of the files that are in the public.
28 replies
NNuxt
Created by Cesxhin on 8/19/2024 in #❓・help
Problem generic typescript
why now i get error for i18n and lodash for typescirpt? Property '$t' does not exist on type '{ $: ComponentInternalInstance; $data:[...] Property 'useGet' does not exist on type '{ $: ComponentInternalInstance; $data:[...]
8 replies
NNuxt
Created by Cesxhin on 6/12/2024 in #❓・help
It doesn't block passed requests when I have a middleware that checks whether you are authenticated.
I installed plugin nuxt security and i set tokensPerInterval: 1000 and interval: 60000.
export default defineEventHandler((event) => {
const notRequireAuth = ["/api/public"];
const {auth} = parseCookies(event);
const path = event.path;

if(startsWith(path, "/api")){
if(isEmpty(find(notRequireAuth, (url) => path.indexOf(url) !== -1))){
if(isNil(auth)){
throw createError({
statusCode: 401,
statusMessage: "You aren't authenticated"
});
}
}
}
});
export default defineEventHandler((event) => {
const notRequireAuth = ["/api/public"];
const {auth} = parseCookies(event);
const path = event.path;

if(startsWith(path, "/api")){
if(isEmpty(find(notRequireAuth, (url) => path.indexOf(url) !== -1))){
if(isNil(auth)){
throw createError({
statusCode: 401,
statusMessage: "You aren't authenticated"
});
}
}
}
});
How block with "too many request" also form this middleware?
1 replies
NNuxt
Created by Cesxhin on 5/15/2024 in #❓・help
Problem typescript with modules
When launch "npm run typecheck" not detected correct also the folders inside modules. Solution?
3 replies
NNuxt
Created by Cesxhin on 4/11/2024 in #❓・help
[RESOLVED] Problem with modules
No description
4 replies
NNuxt
Created by Cesxhin on 4/8/2024 in #❓・help
[RESOLVED] Vue Warning Hydration
No description
7 replies
NNuxt
Created by Cesxhin on 4/5/2024 in #❓・help
[RESOLVED] I need await on start up of app.vue
I would like to wait until it has finished loading all the essential data to be able to proceed with using the application, what is the best practice? I'm currently using a plugin and until it enters onMounted the layout and page aren't shown.
<template>
<NuxtLayout v-if="finish">
<NuxtPage />
</NuxtLayout>
</template>

<script setup lang="ts">
const finish = ref(false);
onMounted(() => finish.value = true)
</script>
<template>
<NuxtLayout v-if="finish">
<NuxtPage />
</NuxtLayout>
</template>

<script setup lang="ts">
const finish = ref(false);
onMounted(() => finish.value = true)
</script>
56 replies