DoHn
DoHn
Explore posts from servers
SSolidJS
Created by DoHn on 5/25/2024 in #support
Do something when a submission ends if there's more than 1 action
Hey everyone. For showing user feedback (like a toast) when an action was done I was checking the action.result inside a createEffect where action is the returned value from useSubmission(myAction) This has been working fine but breaks the moment I use more than one useSubmission in the same component. All effects run on success even if just one action was fired (in my case showing multiple toasts) What's the pattern for handling this?
13 replies
NNuxt
Created by DoHn on 4/25/2024 in #❓・help
How to come up with reproductions for production-only Nuxt crashes?
We're having quite a few Sentry alerts in production due to stuff like manifest errors (similar to https://github.com/nuxt/nuxt/issues/25977) or failed CSS preloading, but we currently can't provide repros as there are way to many modules in the project and these errors are very obscure. What's the approach for debugging them and maybe be able to get a repro?
3 replies
NNuxt
Created by DoHn on 4/13/2024 in #❓・help
What's the proper way to define JSX components?
No description
2 replies
NNuxt
Created by DoHn on 4/6/2024 in #❓・help
How to debug Node memory allocation errors?
Hi! Recently my Nuxt app has started acting up a bit and during development I see these errors that completely crash the dev server:
✔ Nuxt Nitro server built in 804 ms nitro 5:36:47 PM
node(39651,0x17207b000) malloc: *** error for object 0x118b212f8: pointer being freed was not allocated
node(39651,0x17207b000) malloc: *** set a breakpoint in malloc_error_break to debug
✔ Nuxt Nitro server built in 804 ms nitro 5:36:47 PM
node(39651,0x17207b000) malloc: *** error for object 0x118b212f8: pointer being freed was not allocated
node(39651,0x17207b000) malloc: *** set a breakpoint in malloc_error_break to debug
Is there a flag or something I can use to find the culprit module?
4 replies
DTDrizzle Team
Created by DoHn on 10/17/2023 in #help
PostgresError: unrecognized configuration parameter "schema"
Hi everyone. I'm migrating a pretty large app from Prisma to Drizzle and its been great so far, but I'm having problems with my seed script:
const client = postgres(DATABASE_URL!, { max: 1 })
const db = drizzle(client, { schema })
const client = postgres(DATABASE_URL!, { max: 1 })
const db = drizzle(client, { schema })
When I run it it says: PostgresError: unrecognized configuration parameter "schema" The schema object is a re-export of all database models
1 replies
DTDrizzle Team
Created by DoHn on 6/11/2023 in #help
Best way to run safe raw queries when only having access to the table name?
Hey I'm working a Drizzle adapter for a library. The Adapter API only has access to the db Drizzle instance and the table name, what's the best way to perform a SELECT * FROM table given only those two parameters? The sql operator works by passing not the table name, but the schema (which I dont have access to) so I tried sql.raw but it doesn't escape variables. I could escape them manually, but maybe there's an easier/better way.
1 replies