MrGreyKnight
MrGreyKnight
Explore posts from servers
TTCTheo's Typesafe Cult
Created by MrGreyKnight on 5/6/2024 in #questions
Client side SDK
I need to use a in browser sdk for connecting to our dymo printers and dymo provides as JS sdk for us to use however I’m not sure the best way to add this to a next js app Using t3 (ts) and app router. Can anyone advise? The framework makes local requests to a piece of software installed on the local machine so it will never be possible for nextjs to run it on server or build. I assumed that client components would be the route but not getting anywhere
1 replies
TTCTheo's Typesafe Cult
Created by MrGreyKnight on 9/2/2023 in #questions
VSCode TS Server and typescript compiler giving different results with prisma
I have prisma setup on a rather large project which has been compiling fine until today. Looking over the commit logs there has been no changes in our prisma files, setup or the code which is erroring. In VS code it is managing to find the types for our models and their respective query types (find many, delete) But when building nextjs it gives me an error saying that the propertydoesn’t exist on type PrismaClient<PrismaClientOptions, never, DefaultArgs> Super stumped as to what the issue is, the only changes have been on a completely separate api route which only uses raw query and no changes to prisma or the api route giving the type error. I have tried updating prisma to 5.2.0, re-generating the prisma client but I don’t understand why the issue has randomly shown up and only on build not in VS code (it can find all the models)
4 replies
TTCTheo's Typesafe Cult
Created by MrGreyKnight on 5/6/2023 in #questions
TRPC onClick
What is the best way to call a TRPC client on a button click. looking to get data from TPRC
8 replies
TTCTheo's Typesafe Cult
Created by MrGreyKnight on 2/3/2023 in #questions
Using clientside only library with nextjs (t3)
I have been working on a rebuild of an ancients system that we use in nextjs (t3 all in with ts) however we require to use a javascript library for connecting to our printers (dymo labelwriter sdk), what is the best way to achieve using the library with the t3stack without getting hydration issues or a load of type errors and not having the library run on the server side? (the library is old and kinda shitty and I don't feel like trying to rewrite it)
3 replies
TTCTheo's Typesafe Cult
Created by MrGreyKnight on 1/6/2023 in #questions
Global CSS cannot be import, src directory issue
Probably a noob question, just trying the T3 stack with turbo. No changes to the code other than adding, turbo and setting environment variables. However, I am getting an issue with the global css import due to the src directory usage.
dev: ready - started server on 0.0.0.0:3001, url: http://localhost:3001
dev: info - Loaded env from C:\Users\****\#Code\****\.env
dev: (node:26312) [DEP_WEBPACK_MODULE_ISSUER] DeprecationWarning: Module.issuer: Use new ModuleGraph API
dev: (Use `node --trace-deprecation ...` to show where the warning was created)
dev: error - ../../#Code/****/src/styles/globals.css
dev: Global CSS cannot be imported from files other than your Custom <App>. Due to the Global nature of stylesheets, and to avoid conflicts, Please move all first-party global CSS imports to pages/_app.js. Or convert the import to Component-Level CSS (CSS Modules).
dev: Read more: https://nextjs.org/docs/messages/css-global
dev: Location: ..\..\#Code\spartan-v2\src\pages\_app.tsx
dev: ready - started server on 0.0.0.0:3001, url: http://localhost:3001
dev: info - Loaded env from C:\Users\****\#Code\****\.env
dev: (node:26312) [DEP_WEBPACK_MODULE_ISSUER] DeprecationWarning: Module.issuer: Use new ModuleGraph API
dev: (Use `node --trace-deprecation ...` to show where the warning was created)
dev: error - ../../#Code/****/src/styles/globals.css
dev: Global CSS cannot be imported from files other than your Custom <App>. Due to the Global nature of stylesheets, and to avoid conflicts, Please move all first-party global CSS imports to pages/_app.js. Or convert the import to Component-Level CSS (CSS Modules).
dev: Read more: https://nextjs.org/docs/messages/css-global
dev: Location: ..\..\#Code\spartan-v2\src\pages\_app.tsx
I have not used the src directory within next myself before and cannot seem to find anything that would relate to the issue through the docs (t3, nextjs) and unsure how to resolve
5 replies