MadaShindeInai
MadaShindeInai
TtRPC
Created by MadaShindeInai on 2/4/2025 in #❓-help
Error: Error serializing `.trpcState.json.queries[3].promise` returned from `getStaticProps`
20 replies
TtRPC
Created by MadaShindeInai on 2/4/2025 in #❓-help
Error: Error serializing `.trpcState.json.queries[3].promise` returned from `getStaticProps`
20 replies
TtRPC
Created by MadaShindeInai on 2/4/2025 in #❓-help
Error: Error serializing `.trpcState.json.queries[3].promise` returned from `getStaticProps`
UPD. trpcState: JSON.stringify(prefetchHelper.dehydrate()), that helped to prevent build failures (not sure about data I get yet). One more thing, is that it appeared that issue happens only in case of Dependant queries.
20 replies
TtRPC
Created by MadaShindeInai on 2/4/2025 in #❓-help
Error: Error serializing `.trpcState.json.queries[3].promise` returned from `getStaticProps`
802 the same issue 😐
20 replies
TtRPC
Created by Adicss on 2/20/2025 in #❓-help
Upgrading tRPC v10 to v11 in NextJS 15.0.1
Is your Typescript verion greater then 5.7.3?
6 replies
TtRPC
Created by MadaShindeInai on 2/4/2025 in #❓-help
Error: Error serializing `.trpcState.json.queries[3].promise` returned from `getStaticProps`
No description
20 replies
TtRPC
Created by MadaShindeInai on 2/4/2025 in #❓-help
Error: Error serializing `.trpcState.json.queries[3].promise` returned from `getStaticProps`
768 same thing
20 replies
TtRPC
Created by MadaShindeInai on 2/4/2025 in #❓-help
Error: Error serializing `.trpcState.json.queries[3].promise` returned from `getStaticProps`
Hi. Trouble is, as I said earlier, I can't do stable reproduction. (I tried!) Even in current project, if I remove unnecessary routes, leaving only the ones that crashed with an error before and build again - build goes fine. But increasing the number of routes - the errors start dropping again. However, I can send an invite to the repository where this happens, and share environment variables in DM. Would that work?
20 replies
TtRPC
Created by MadaShindeInai on 2/4/2025 in #❓-help
Error: Error serializing `.trpcState.json.queries[3].promise` returned from `getStaticProps`
:trpc:
20 replies
TtRPC
Created by MadaShindeInai on 2/4/2025 in #❓-help
Error: Error serializing `.trpcState.json.queries[3].promise` returned from `getStaticProps`
UPD. tRPC v474 gives the same errors.
20 replies
TtRPC
Created by MadaShindeInai on 2/4/2025 in #❓-help
Error: Error serializing `.trpcState.json.queries[3].promise` returned from `getStaticProps`
No type errors. From the types/linters side, everything is ok. typescript latest, eslint 9.19
20 replies
TtRPC
Created by MadaShindeInai on 2/4/2025 in #❓-help
Error: Error serializing `.trpcState.json.queries[3].promise` returned from `getStaticProps`
Uh, almost forgot, Package versions: "@tanstack/react-query": "5.66.0", "@trpc/client": "11.0.0-rc.730", "@trpc/next": "11.0.0-rc.730", "@trpc/react-query": "11.0.0-rc.730", "@trpc/server": "11.0.0-rc.730",
20 replies
TtRPC
Created by MadaShindeInai on 2/4/2025 in #❓-help
Error: Error serializing `.trpcState.json.queries[3].promise` returned from `getStaticProps`
No description
20 replies
TtRPC
Created by MadaShindeInai on 2/4/2025 in #❓-help
Error: Error serializing `.trpcState.json.queries[3].promise` returned from `getStaticProps`
And really helper.dyhydrate() returns promise like data mixed with real responses. (I removed real one).
{
"json": {
"mutations": [],
"queries": [
{
"state": {
"data": null,
"dataUpdateCount": 0,
"dataUpdatedAt": 0,
"error": null,
"errorUpdateCount": 0,
"errorUpdatedAt": 0,
"fetchFailureCount": 0,
"fetchFailureReason": null,
"fetchMeta": null,
"isInvalidated": false,
"status": "pending",
"fetchStatus": "fetching"
},
"queryKey": [
[
"questions",
"getQuestionBySlug"
],
{
"input": {
"slug": "title2036261-ZB86Y"
},
"type": "query"
}
],
"queryHash": "[[\"questions\",\"getQuestionBySlug\"],{\"input\":{\"slug\":\"title2036261-ZB86Y\"},\"type\":\"query\"}]",
"promise": {}
},
]
},
"meta": {
"values": {
"queries.0.state.data": [
"undefined"
],
}
}
}
{
"json": {
"mutations": [],
"queries": [
{
"state": {
"data": null,
"dataUpdateCount": 0,
"dataUpdatedAt": 0,
"error": null,
"errorUpdateCount": 0,
"errorUpdatedAt": 0,
"fetchFailureCount": 0,
"fetchFailureReason": null,
"fetchMeta": null,
"isInvalidated": false,
"status": "pending",
"fetchStatus": "fetching"
},
"queryKey": [
[
"questions",
"getQuestionBySlug"
],
{
"input": {
"slug": "title2036261-ZB86Y"
},
"type": "query"
}
],
"queryHash": "[[\"questions\",\"getQuestionBySlug\"],{\"input\":{\"slug\":\"title2036261-ZB86Y\"},\"type\":\"query\"}]",
"promise": {}
},
]
},
"meta": {
"values": {
"queries.0.state.data": [
"undefined"
],
}
}
}
20 replies
TtRPC
Created by MadaShindeInai on 2/4/2025 in #❓-help
Error: Error serializing `.trpcState.json.queries[3].promise` returned from `getStaticProps`
I also double checked all chains from the "await prefetchHelper." up to prisma query, and can confirm that all async / await declarations are in place and defined explicitly.
20 replies
TtRPC
Created by DINO on 9/1/2024 in #❓-help
How do I create a React/Node full-stack project with tRPC?
I meant https://create.t3.gg/ T3-app setup. Just decouple NextJs from there and replace it with Remix 🙂 I may be wrong, but Idea is that you need to have both FE and BE part in your app (in the same repo). You can achieve it with Fullstack framework or maybe React + SST framework.
9 replies
TtRPC
Created by DINO on 9/1/2024 in #❓-help
How do I create a React/Node full-stack project with tRPC?
You can use Create-T3-app to create already configured app. If NextJS if not framework of your choise, you can use this setup as example.
9 replies
TtRPC
Created by brumbrum_brum on 8/17/2024 in #❓-help
Procedures with paramters.
I'm doing this 🙂 But you can check T3-app + Clerk.io integration example. They pass Clerk auth there.
9 replies
TtRPC
Created by brumbrum_brum on 8/17/2024 in #❓-help
Procedures with paramters.
You can pass any data to context and then access it in procedure
9 replies
TtRPC
Created by MadaShindeInai on 8/17/2024 in #❓-help
Prefertch() privateProcedure (Clerk) in gSSP
Ah, I needed to pass "auth" from gSSP to prefetchHelper. Works.
type getPrefetchHelperArgs = {
auth: Parameters<typeof createInnerTRPCContext>[number]["auth"];
};
export const getPrefetchHelper = ({ auth }: getPrefetchHelperArgs) => {
const prefetchHelper = createServerSideHelpers({
router: appRouter,
ctx: createInnerTRPCContext({ auth }),
transformer: superjson, // optional - adds superjson serialization
});
return prefetchHelper;
};
type getPrefetchHelperArgs = {
auth: Parameters<typeof createInnerTRPCContext>[number]["auth"];
};
export const getPrefetchHelper = ({ auth }: getPrefetchHelperArgs) => {
const prefetchHelper = createServerSideHelpers({
router: appRouter,
ctx: createInnerTRPCContext({ auth }),
transformer: superjson, // optional - adds superjson serialization
});
return prefetchHelper;
};
3 replies