IsaacR943
IsaacR943
NNuxt
Created by IsaacR943 on 2/11/2025 in #❓・help
Cloudflare pages 404?
That solved the issue. Havent face the same situation again tho«
8 replies
NNuxt
Created by IsaacR943 on 2/11/2025 in #❓・help
Cloudflare pages 404?
Yes. I did solve it. launch a new hello world application then copy paste everything
8 replies
NNuxt
Created by IsaacR943 on 1/28/2025 in #❓・help
Cant make any logger work in a clean nuxt application
Update: I found out that the logger is only available for server directory - its pointless trying to log the front end or composables The instructions above to add a library to the server and use something like a logger.server.ts file works, only for the server tho Yes, i guess could write to a db each log instead of a file. However I will later connect a cron job to read any errors in the code - for that purpose writing to a db is no good. Cron jobs from uptime robot / cronitor can only read files
18 replies
NNuxt
Created by IsaacR943 on 1/28/2025 in #❓・help
Cant make any logger work in a clean nuxt application
@kapa.ai I did as oyu said. Change the package json:
{
"name": "nuxt-app",
"private": true,
"type": "module",
"scripts": {
...
{
"name": "nuxt-app",
"private": true,
"type": "module",
"scripts": {
...
export default defineNuxtConfig({
compatibilityDate: '2024-11-01',
devtools: { enabled: true },
modules: ['@nuxtjs/i18n'],
vite: {
ssr: {
noExternal: ['log4js']
}
}
})
export default defineNuxtConfig({
compatibilityDate: '2024-11-01',
devtools: { enabled: true },
modules: ['@nuxtjs/i18n'],
vite: {
ssr: {
noExternal: ['log4js']
}
}
})
// logger.js
import log4js from 'log4js';
log4js.configure({
appenders: {
err: {
type: "file",
filename: "./logs/errors.log",
layout: {
....
// logger.js
import log4js from 'log4js';
log4js.configure({
appenders: {
err: {
type: "file",
filename: "./logs/errors.log",
layout: {
....
The error now is :
500
require_util(...).inspect is not a function

at createAppender (http://localhost:3000/_nuxt/node_modules/.cache/vite/client/deps/log4js.js?v=46045050:1834:54)
at getAppender (http://localhost:3000/_nuxt/node_modules/.cache/vite/client/deps/log4js.js?v=46045050:1796:24)
at http://localhost:3000/_nuxt/node_modules/.cache/vite/client/deps/log4js.js?v=46045050:1865:11
at Array.forEach ()
at setup (http://localhost:3000/_nuxt/node_modules/.cache/vite/client/deps/log4js.js?v=46045050:1863:37)
at http://localhost:3000/_nuxt/node_modules/.cache/vite/client/deps/log4js.js?v=46045050:727:39
at Array.forEach ()
at Object.configure (http://localhost:3000/_nuxt/node_modules/.cache/vite/client/deps/log4js.js?v=46045050:727:17)
at Object.configure (http://localhost:3000/_nuxt/node_modules/.cache/vite/client/deps/log4js.js?v=46045050:2716:21)
at http://localhost:3000/_nuxt/utils/logger.js?t=1738028632765:2:8
500
require_util(...).inspect is not a function

at createAppender (http://localhost:3000/_nuxt/node_modules/.cache/vite/client/deps/log4js.js?v=46045050:1834:54)
at getAppender (http://localhost:3000/_nuxt/node_modules/.cache/vite/client/deps/log4js.js?v=46045050:1796:24)
at http://localhost:3000/_nuxt/node_modules/.cache/vite/client/deps/log4js.js?v=46045050:1865:11
at Array.forEach ()
at setup (http://localhost:3000/_nuxt/node_modules/.cache/vite/client/deps/log4js.js?v=46045050:1863:37)
at http://localhost:3000/_nuxt/node_modules/.cache/vite/client/deps/log4js.js?v=46045050:727:39
at Array.forEach ()
at Object.configure (http://localhost:3000/_nuxt/node_modules/.cache/vite/client/deps/log4js.js?v=46045050:727:17)
at Object.configure (http://localhost:3000/_nuxt/node_modules/.cache/vite/client/deps/log4js.js?v=46045050:2716:21)
at http://localhost:3000/_nuxt/utils/logger.js?t=1738028632765:2:8
18 replies
NNuxt
Created by IsaacR943 on 1/28/2025 in #❓・help
Cant make any logger work in a clean nuxt application
@kapa.ai now that promps another error in my console:
500
require is not defined

at http://localhost:3000/_nuxt/utils/logger.js?t=1738028537001:1:16
500
require is not defined

at http://localhost:3000/_nuxt/utils/logger.js?t=1738028537001:1:16
from the code:
const log4js = require('log4js')

log4js.configure({
appenders: {
err: {
type: "file",
filename: "./logs/errors.log",
layout: {
type: "pattern",
pattern: '{"timestamp": "%d", "loglevel": "%p" , "logcategory": "%c" ,"message": "%m" , "path": "%f","line": "%l", "method": "%M" }'
}
},
info: {
type: "file",
filename: "./logs/info.log",
layout: {
type: "pattern",
pattern: '{"timestamp": "%d", "loglevel": "%p" , "logcategory": "%c" ,"message": "%m" , "path": "%f","line": "%l", "method": "%M" }'
}
}
},
categories: {
default: { appenders: ["err","info"], level: "debug", enableCallStack: true },
}
});

export const logger = log4js.getLogger("err");
const log4js = require('log4js')

log4js.configure({
appenders: {
err: {
type: "file",
filename: "./logs/errors.log",
layout: {
type: "pattern",
pattern: '{"timestamp": "%d", "loglevel": "%p" , "logcategory": "%c" ,"message": "%m" , "path": "%f","line": "%l", "method": "%M" }'
}
},
info: {
type: "file",
filename: "./logs/info.log",
layout: {
type: "pattern",
pattern: '{"timestamp": "%d", "loglevel": "%p" , "logcategory": "%c" ,"message": "%m" , "path": "%f","line": "%l", "method": "%M" }'
}
}
},
categories: {
default: { appenders: ["err","info"], level: "debug", enableCallStack: true },
}
});

export const logger = log4js.getLogger("err");
18 replies
NNuxt
Created by IsaacR943 on 1/20/2025 in #❓・help
Bun not found in nuxt application?
Mittchel - have you publish a nuxt app to the appstore? Do you know which framework I should use?
14 replies
NNuxt
Created by IsaacR943 on 1/20/2025 in #❓・help
Bun not found in nuxt application?
Yeah, i guess thats the definitive solution
14 replies
NNuxt
Created by IsaacR943 on 1/20/2025 in #❓・help
Bun not found in nuxt application?
Thanks, will try throughout the day. - I've heard the --bun works for some people however is not my case. The explanation I received from someone of the Nuxt team that contacted me for this error is that some process (possible a library) is using node - breaking the application and making the --bun flag useless. However he did not mentioned anything about how to identify what library was doing this lol.
14 replies
NNuxt
Created by IsaacR943 on 1/18/2025 in #❓・help
SQLITE in production
i could use nuxtignore to ignore the file at the server directory?
6 replies
NNuxt
Created by IsaacR943 on 1/11/2025 in #❓・help
Common Nitro Gotchas when proxying to wordpress instance
inexperience
6 replies
NNuxt
Created by IsaacR943 on 12/31/2024 in #❓・help
Radix direct auto-import breaking
ended up doing my own component with claude
9 replies
NNuxt
Created by IsaacR943 on 1/4/2025 in #❓・help
i18n - Error on redirects
tht didnt worked
7 replies
NNuxt
Created by IsaacR943 on 12/31/2024 in #❓・help
layers a comprehensive guide
I will read the unjs docs and resolve my questions with gpt or kapa Layers is one of the features in my opinion set nuxt apart from others. However my main concerns are: - required additional optimization to 'deflate' the project - breaking changes in nuxt 4 (btw everyone is waiting for this update ❤️ )
7 replies
NNuxt
Created by IsaacR943 on 12/31/2024 in #❓・help
Radix direct auto-import breaking
This is the component:
<script setup>
import {
SquareX
} from 'lucide-vue-next'

import { DialogRoot, DialogTrigger, DialogOverlay, DialogTitle, DialogClose, DialogDescription, DialogContent, DialogPortal } from '#components';
</script>
<template>
<DialogRoot>
<DialogTrigger @click.stop class="inline-block">
<div class="pointer-events-none">
<slot>Default Tag</slot>
</div>
</DialogTrigger>
<DialogPortal>
<DialogOverlay
class="bg-blackA9/50 backdrop-blur-sm data-[state=open]:animate-overlayShow fixed inset-0 z-30"
/>
<DialogContent
class="data-[state=open]:animate-contentShow fixed top-[50%] left-[50%] max-h-[85vh] w-[90vw] max-w-[450px] translate-x-[-50%] translate-y-[-50%] rounded-[6px] bg-white p-[25px] shadow-[hsl(206_22%_7%_/_35%)_0px_10px_38px_-10px,_hsl(206_22%_7%_/_20%)_0px_10px_20px_-15px] focus:outline-none z-[100]"
>
<DialogTitle class="text-mauve12 m-0 text-[17px] font-semibold">
<slot name="title">Title</slot>
</DialogTitle>
<DialogDescription class="text-mauve11 mt-[10px] mb-5 text-[15px] leading-normal">
<slot name="description">description</slot>
</DialogDescription>

<DialogClose
class="text-grass11 hover:bg-green4 focus:shadow-green7 absolute top-[10px] right-[10px] inline-flex h-[25px] w-[25px] appearance-none items-center justify-center focus:shadow-[0_0_0_2px] focus:outline-none"
aria-label="Close"
>
<SquareX/>
</DialogClose>
</DialogContent>
</DialogPortal>
</DialogRoot>
</template>
<script setup>
import {
SquareX
} from 'lucide-vue-next'

import { DialogRoot, DialogTrigger, DialogOverlay, DialogTitle, DialogClose, DialogDescription, DialogContent, DialogPortal } from '#components';
</script>
<template>
<DialogRoot>
<DialogTrigger @click.stop class="inline-block">
<div class="pointer-events-none">
<slot>Default Tag</slot>
</div>
</DialogTrigger>
<DialogPortal>
<DialogOverlay
class="bg-blackA9/50 backdrop-blur-sm data-[state=open]:animate-overlayShow fixed inset-0 z-30"
/>
<DialogContent
class="data-[state=open]:animate-contentShow fixed top-[50%] left-[50%] max-h-[85vh] w-[90vw] max-w-[450px] translate-x-[-50%] translate-y-[-50%] rounded-[6px] bg-white p-[25px] shadow-[hsl(206_22%_7%_/_35%)_0px_10px_38px_-10px,_hsl(206_22%_7%_/_20%)_0px_10px_20px_-15px] focus:outline-none z-[100]"
>
<DialogTitle class="text-mauve12 m-0 text-[17px] font-semibold">
<slot name="title">Title</slot>
</DialogTitle>
<DialogDescription class="text-mauve11 mt-[10px] mb-5 text-[15px] leading-normal">
<slot name="description">description</slot>
</DialogDescription>

<DialogClose
class="text-grass11 hover:bg-green4 focus:shadow-green7 absolute top-[10px] right-[10px] inline-flex h-[25px] w-[25px] appearance-none items-center justify-center focus:shadow-[0_0_0_2px] focus:outline-none"
aria-label="Close"
>
<SquareX/>
</DialogClose>
</DialogContent>
</DialogPortal>
</DialogRoot>
</template>
9 replies
NNuxt
Created by IsaacR943 on 11/19/2024 in #❓・help
Error deploying to fly.io
If you do know how to optimize and deploy layers i would very much appreciate your tips
10 replies
NNuxt
Created by IsaacR943 on 11/19/2024 in #❓・help
Error deploying to fly.io
you will not like the answer but - after done my research it seems that layers add too much over head and even if you deploy the application you end up with a very heavy app (if you dont optimize each layer will have a similar weight and consume similar resources as a stand alone app would). The solutions was to manually copy paste everything into folders at the destination
10 replies
NNuxt
Created by IsaacR943 on 11/19/2024 in #❓・help
Error deploying to fly.io
yes
10 replies
NNuxt
Created by IsaacR943 on 11/22/2024 in #❓・help
Bizzare error with whole screen split in two
useless. The solution was to wrap the asynnc omponent into <ClientOnly>
6 replies
NNuxt
Created by IsaacR943 on 11/13/2024 in #❓・help
Make explicit auto import of a component
update - a turn around is doing something like
import { NavbarLogoMain as Logo } from '#components'
import { NavbarLogoMain as Logo } from '#components'
5 replies
NNuxt
Created by IsaacR943 on 11/13/2024 in #❓・help
Disable auto components
can i make explicit the path fro the component to auto import? for instance import main from components/menu folder
5 replies