johnk
johnk
Explore posts from servers
NNuxt
Created by johnk on 9/10/2024 in #❓・help
How would I listen for a websocket message in Nuxt 3, for user initiated notifications to users?
Thanks! Should I worry about having two websocket clients open? I’m not familiar with the performance impact of websockets.
3 replies
NNuxt
Created by johnk on 8/30/2024 in #❓・help
Type is completely ignored in generated mjs, causes Nuxt #imports issues
Anyone can help?
2 replies
CCoder.com
Created by johnk on 7/23/2024 in #help
Coder docker container works on N4 Google Compute instance but no longer C4
Ohhh that makes sense. Bad timing because in that time I stopped using it and started using N4 😭 thank you though! I checked for ongoing issues in the dashboard but nothing relevant.
4 replies
PPrisma
Created by johnk on 6/20/2024 in #help-and-questions
Prisma Nuxt RollupError
Hello, same error with npm. Slightly different.
ℹ Vite server warmed up in 5669ms 10:18:50 PM
ℹ Vite client warmed up in 6205ms 10:18:50 PM

[10:18:50 PM] WARN [plugin inject] node_modules/@prisma/nuxt/dist/runtime/server/utils/prisma.d.ts: rollup-plugin-inject: failed to parse /home/joe/novaint/node_modules/@prisma/nuxt/dist/runtime/server/utils/prisma.d.ts. Consider restricting the plugin to particular files via options.include


[nitro 10:18:50 PM] ERROR RollupError: node_modules/@prisma/nuxt/dist/runtime/server/utils/prisma.d.ts (2:8): Expected ';', '}' or <eof> (Note that you need plugins to import files that are not JavaScript)


1: import { PrismaClient } from "@prisma/client";
2: declare const prismaClientSingleton: () => PrismaClient<import(".prisma/client").Prisma.PrismaClientOptions, never, i...
^
3: declare const prisma: PrismaClient<import(".prisma/client").Prisma.PrismaClientOptions, never, import("@prisma/client...
4: export type CustomPrismaClient = ReturnType<typeof prismaClientSingleton>;

✔ Nuxt Nitro server built in 546 ms
ℹ Vite server warmed up in 5669ms 10:18:50 PM
ℹ Vite client warmed up in 6205ms 10:18:50 PM

[10:18:50 PM] WARN [plugin inject] node_modules/@prisma/nuxt/dist/runtime/server/utils/prisma.d.ts: rollup-plugin-inject: failed to parse /home/joe/novaint/node_modules/@prisma/nuxt/dist/runtime/server/utils/prisma.d.ts. Consider restricting the plugin to particular files via options.include


[nitro 10:18:50 PM] ERROR RollupError: node_modules/@prisma/nuxt/dist/runtime/server/utils/prisma.d.ts (2:8): Expected ';', '}' or <eof> (Note that you need plugins to import files that are not JavaScript)


1: import { PrismaClient } from "@prisma/client";
2: declare const prismaClientSingleton: () => PrismaClient<import(".prisma/client").Prisma.PrismaClientOptions, never, i...
^
3: declare const prisma: PrismaClient<import(".prisma/client").Prisma.PrismaClientOptions, never, import("@prisma/client...
4: export type CustomPrismaClient = ReturnType<typeof prismaClientSingleton>;

✔ Nuxt Nitro server built in 546 ms
8 replies
NNuxt
Created by johnk on 4/5/2024 in #❓・help
Set header from server middleware
Awesome, sounds like a plan! Thank you very much for your help, I really appreciate it!
5 replies
NNuxt
Created by johnk on 4/5/2024 in #❓・help
Set header from server middleware
Maybe I need to rethink my approach. My goal is to avoid calling retrieving directly from the kinde api in the client, and instead accessing it through my server, so I can more easily have fine tuned control, and to do that I need to store the token I retrieve, and I would like to avoid retrieving it again and again outright (I want to hide it essentially.) Do you think it could be more reasonable as a series of composables instead?
5 replies
NNuxt
Created by johnk on 4/5/2024 in #❓・help
Set header from server middleware
Thank you! How could I do this on the server side? e.g. from a server/api/xxx
5 replies
NNuxt
Created by johnk on 4/5/2024 in #❓・help
Set header from server middleware
Hmmm noted. I simply want to add the token with every request automatically, without having to $fetch the token outright every time I want it. The docs say that one of the use cases for server middleware is adding headers so I was going by that.
5 replies