ippo
ippo
Explore posts from servers
TtRPC
Created by ippo on 8/23/2023 in #❓-help
fetch failed - error on npm start on production
I rebuild my next.js app with the npm run build command and I started it with npm start I get this error when I visit the site: (In development I have no problems)
now I get this error:
<< query #1 post.hello {
input: { text: 'from tRPC server!' },
result: transformResult_9a244fe7_TRPCClientError: fetch failed
at transformResult_9a244fe7_TRPCClientError.from (/Users/ippo/tRPC-TEST/t3-next13-app/.next/server/chunks/376.js:340:16)
at /Users/ippo/tRPC-TEST/t3-next13-app/.next/server/chunks/376.js:791:89
at runNextTicks (node:internal/process/task_queues:60:5)
at listOnTimeout (node:internal/timers:533:9)
at process.processTimers (node:internal/timers:507:7) {
meta: undefined,
shape: undefined,
data: undefined,
[cause]: TypeError: fetch failed
at Object.fetch (node:internal/deps/undici/undici:11118:11)
at runNextTicks (node:internal/process/task_queues:60:5)
at listOnTimeout (node:internal/timers:533:9)
at process.processTimers (node:internal/timers:507:7) {
cause: [InvalidArgumentError]
}
},
elapsedMs: 8,
context: {}
}
(node:19274) ExperimentalWarning: The Fetch API is an experimental feature. This feature could change at any time
(Use `node --trace-warnings ...` to show where the warning was created)
transformResult_9a244fe7_TRPCClientError: fetch failed
at transformResult_9a244fe7_TRPCClientError.from (/Users/ippo/tRPC-TEST/t3-next13-app/.next/server/chunks/376.js:340:16)
at /Users/ippo/tRPC-TEST/t3-next13-app/.next/server/chunks/376.js:791:89
.......
.......
[Error: An error occurred in the Server Components render. The specific message is omitted in production builds to avoid leaking sensitive details. A digest property is included on this error instance which may provide additional details about the nature of the error.] {
digest: '4145997467'
now I get this error:
<< query #1 post.hello {
input: { text: 'from tRPC server!' },
result: transformResult_9a244fe7_TRPCClientError: fetch failed
at transformResult_9a244fe7_TRPCClientError.from (/Users/ippo/tRPC-TEST/t3-next13-app/.next/server/chunks/376.js:340:16)
at /Users/ippo/tRPC-TEST/t3-next13-app/.next/server/chunks/376.js:791:89
at runNextTicks (node:internal/process/task_queues:60:5)
at listOnTimeout (node:internal/timers:533:9)
at process.processTimers (node:internal/timers:507:7) {
meta: undefined,
shape: undefined,
data: undefined,
[cause]: TypeError: fetch failed
at Object.fetch (node:internal/deps/undici/undici:11118:11)
at runNextTicks (node:internal/process/task_queues:60:5)
at listOnTimeout (node:internal/timers:533:9)
at process.processTimers (node:internal/timers:507:7) {
cause: [InvalidArgumentError]
}
},
elapsedMs: 8,
context: {}
}
(node:19274) ExperimentalWarning: The Fetch API is an experimental feature. This feature could change at any time
(Use `node --trace-warnings ...` to show where the warning was created)
transformResult_9a244fe7_TRPCClientError: fetch failed
at transformResult_9a244fe7_TRPCClientError.from (/Users/ippo/tRPC-TEST/t3-next13-app/.next/server/chunks/376.js:340:16)
at /Users/ippo/tRPC-TEST/t3-next13-app/.next/server/chunks/376.js:791:89
.......
.......
[Error: An error occurred in the Server Components render. The specific message is omitted in production builds to avoid leaking sensitive details. A digest property is included on this error instance which may provide additional details about the nature of the error.] {
digest: '4145997467'
3 replies
TtRPC
Created by ippo on 6/4/2023 in #❓-help
Query tRPC the right way
If you use graphql, you can precisely query what you exactly need and avoid over fetching, so you can do something like this:
user {
id
username
avatar
}

user {
id
username
avatar
email
updatedAt
}
user {
id
username
avatar
}

user {
id
username
avatar
email
updatedAt
}
how would you do that in tRPC? do you have to implement an interface like this?
getUser({
select: ["id", "avatar", "username"],
orderBy: "ASC"
})
getUser({
select: ["id", "avatar", "username"],
orderBy: "ASC"
})
and what is if you want to query related stuff, like the user and its pets and from the pets you just want the ids but in other cases the names and ids
6 replies
TtRPC
Created by ippo on 4/29/2023 in #❓-help
express-session for tRPC
I am using express-session for all my servers to create session authentication. Is there something for tRPC that you can recommend, to get session authentication?
9 replies