neochrome
neochrome
TTCTheo's Typesafe Cult
Created by neochrome on 7/17/2023 in #questions
VSCode debugger help
So I need some help with setting up a debugger. I have a dockercompose which runs like 7 docker containers. for the mian container which runs the server.ts the debugger works. If I use the same approac to create another debugger for another service which is like src/exports/exports.ts and make a debugger and launch.json for it, it can't connect I get the error no debugger found or something like that. When I try to curl ocalhost:<port> I get empty response is it a problem because the export.ts is not a server but just a Script that runs on the container? is there something I can do to make the debugger work? this is my launch.json
{
"name": "Docker: Attach to App",
"type": "node",
"request": "attach",
"port": 9229,
"address": "localhost",
"localRoot": "${workspaceFolder}/src/exports",
"remoteRoot": "/app/src/exports",
"protocol": "inspector"
}
{
"name": "Docker: Attach to App",
"type": "node",
"request": "attach",
"port": 9229,
"address": "localhost",
"localRoot": "${workspaceFolder}/src/exports",
"remoteRoot": "/app/src/exports",
"protocol": "inspector"
}
ERROR: Error: Could not connect to debug target at http://localhost:9229: Could not find any debuggable target
6 replies
TTCTheo's Typesafe Cult
Created by neochrome on 6/10/2023 in #questions
tRPC / React query noobish question
Hi, I have this Query: const { data: cardSetQuery, refetch: cardSetQueryRefetch } = api.example.getCardSet.useQuery( { text: data?.id || "", }, { enabled: false, } ); Is there a way to do something like this where I want to update MULTIPLE objects with my query result? I essentilly have a dropdown and I want to add icons to the text, but for that I need to query to URLs from another TRPC call.. how do I merge those 2 together? Ideally I would need something like this:
suggestion.forEach(card => {
const responseUrl = useQuery(card.id)
card.url = responseUrl
})
suggestion.forEach(card => {
const responseUrl = useQuery(card.id)
card.url = responseUrl
})
17 replies
TTCTheo's Typesafe Cult
Created by neochrome on 11/8/2022 in #questions
Getting weird error on Vercel when deploying app
So my app works fine locally, however, I pushed to vercel and everything is fun except the fact my TRPC Returns this error:
"TRPCClientError: Unexpected token 'A', "An error o"... is not valid JSON
at u.from (https://myapp.vercel.app/_next/static/chunks/pages/_app-e0b32bccfebdf428.js:1:20800)
at https://myapp.vercel.app/_next/static/chunks/pages/_app-e0b32bccfebdf428.js:1:24691"
"TRPCClientError: Unexpected token 'A', "An error o"... is not valid JSON
at u.from (https://myapp.vercel.app/_next/static/chunks/pages/_app-e0b32bccfebdf428.js:1:20800)
at https://myapp.vercel.app/_next/static/chunks/pages/_app-e0b32bccfebdf428.js:1:24691"
I'm not sure what to do here as it works fine on 2 different enviroments.
7 replies
TTCTheo's Typesafe Cult
Created by neochrome on 10/21/2022 in #questions
Want to update user getting this error `RatingWhereUniqueInput`
Anyone an idea what this is?
11 replies
TTCTheo's Typesafe Cult
Created by neochrome on 10/18/2022 in #questions
T3 stack with Vue, when?
Are there plans to make something like T3 but for Vue?
8 replies
TTCTheo's Typesafe Cult
Created by neochrome on 10/13/2022 in #questions
server side calls trpc
Hi, is there someone who can explain to me how do I make server side call with trpc in t3 ??
52 replies
TTCTheo's Typesafe Cult
Created by neochrome on 9/29/2022 in #questions
Whats the correct way to wait for `trpc.useQuery` to finish and then update state?
Like the title said, I have a case where I need to press a button 2x to update my state. That happens because useEffect does not wait for useQuery to be finished. Is there a way to sync those two ?
7 replies
TTCTheo's Typesafe Cult
Created by neochrome on 9/26/2022 in #questions
Quick question about TRPC query with date
33 replies