Jan Henning
Jan Henning
Explore posts from servers
RRailway
Created by Jan Henning on 8/13/2024 in #✋|help
Watch paths are ignored
Thanks a bunch!
11 replies
RRailway
Created by Jan Henning on 8/13/2024 in #✋|help
Watch paths are ignored
yeah, i probably just enabled anything fancy labeled V2, New, Updated 😂
11 replies
RRailway
Created by Jan Henning on 8/13/2024 in #✋|help
Watch paths are ignored
No description
11 replies
RRailway
Created by Jan Henning on 8/13/2024 in #✋|help
Watch paths are ignored
I do, yeah. That may be it. Will give it a go
11 replies
RRailway
Created by Jan Henning on 7/10/2024 in #✋|help
Deployment failed - Container died
sweet, i can give that a try at some point
26 replies
RRailway
Created by Jan Henning on 7/10/2024 in #✋|help
Deployment failed - Container died
while this makes sense. it by defaults runs the build script in the project although i don't need it to. is there a way to skip the project build (npm/pnpm build) to run at all?
26 replies
RRailway
Created by Jan Henning on 7/10/2024 in #✋|help
Deployment failed - Container died
much much appreciated
26 replies
RRailway
Created by Jan Henning on 7/10/2024 in #✋|help
Deployment failed - Container died
make sense
26 replies
RRailway
Created by Jan Henning on 7/10/2024 in #✋|help
Deployment failed - Container died
or do you know how i can skip the build step on purpose? i just need it to clone and start basically
26 replies
RRailway
Created by Jan Henning on 7/10/2024 in #✋|help
Deployment failed - Container died
which is why im curious the watch paths in some way can affect it
26 replies
RRailway
Created by Jan Henning on 7/10/2024 in #✋|help
Deployment failed - Container died
do you know how long it may take to be back to normal? the service has no build step, and is only asked to run start script
26 replies
RRailway
Created by Jan Henning on 7/10/2024 in #✋|help
Deployment failed - Container died
it seems to be stuck in build step for 30 mins then fails, it's stopping me from pushing a new feature for a client they are waiting for.
26 replies
RRailway
Created by Jan Henning on 7/10/2024 in #✋|help
Deployment failed - Container died
No description
26 replies
RRailway
Created by Jan Henning on 7/10/2024 in #✋|help
Deployment failed - Container died
Sweet, thanks!
26 replies
RRailway
Created by Jan Henning on 7/10/2024 in #✋|help
Deployment failed - Container died
Not sure if related, but none of my services are respecting the watch paths, and the failing service is attempting to build the other service. Although it succeeds so probably not related.
26 replies
RRailway
Created by Ross W on 1/7/2024 in #✋|help
Deploy template button grayed out for existing project
No worries! Unfortunately I don't, no. I'd wait for someone to get back to you which may know more.
14 replies
TtRPC
Created by Jan Henning on 10/28/2023 in #❓-help
`refetchOnWindowFocus` with RSC?
Thank you!
4 replies
TtRPC
Created by Jan Henning on 10/28/2023 in #❓-help
`refetchOnWindowFocus` with RSC?
Yeah, I think I may have been a bit tired last night 😂 I'll just convert to fetching on client to give me a bit more control
4 replies
TtRPC
Created by koko#1337 on 5/26/2023 in #❓-help
TRPCClientError: fetch failed
This thread is one of the top results when googling for UND_ERR_REQ_CONTENT_LENGTH_MISMATCH, so thought I'd add my fix to this as I recently encountered it myself. Using Next.js app router.
"next": "^13.5.6",
"@trpc/client": "^10.41.0",
"@trpc/next": "^10.41.0",
"@trpc/react-query": "^10.41.0",
"@trpc/server": "^10.41.0"
"next": "^13.5.6",
"@trpc/client": "^10.41.0",
"@trpc/next": "^10.41.0",
"@trpc/react-query": "^10.41.0",
"@trpc/server": "^10.41.0"
First, install fetch-ponyfill.
yarn add fetch-ponyfill
yarn add fetch-ponyfill
Then update your httpBatchStreamLink by adding fetch: fetchPonyfill().fetch.
// trpc/server.ts
import fetchPonyfill from "fetch-ponyfill"

export const api = createTRPCProxyClient<AppRouter>({
transformer,
links: [
loggerLink({
enabled: op =>
process.env.NODE_ENV === "development" ||
(op.direction === "down" && op.result instanceof Error)
}),
unstable_httpBatchStreamLink({
url: getUrl(),
fetch: fetchPonyfill().fetch, // <= add this line
headers() {
const heads = new Map(headers())
heads.set("x-trpc-source", "rsc")
return Object.fromEntries(heads)
}
})
]
})
// trpc/server.ts
import fetchPonyfill from "fetch-ponyfill"

export const api = createTRPCProxyClient<AppRouter>({
transformer,
links: [
loggerLink({
enabled: op =>
process.env.NODE_ENV === "development" ||
(op.direction === "down" && op.result instanceof Error)
}),
unstable_httpBatchStreamLink({
url: getUrl(),
fetch: fetchPonyfill().fetch, // <= add this line
headers() {
const heads = new Map(headers())
heads.set("x-trpc-source", "rsc")
return Object.fromEntries(heads)
}
})
]
})
This solved the issue for me. Hopefully this is resolved in the future and will no longer be necessary to ponyfill.
2 replies
TtRPC
Created by Grifn on 7/17/2023 in #❓-help
Next.js app router catch-all HTTP methods
Hi. You can create a handler function and export it as both GET and POST. For example, here's how mine looks. Yours may look different, but the same thing applies to how you can export it 🙂
import { fetchRequestHandler } from "@trpc/server/adapters/fetch"
import { appRouter } from "~/server/routers/_app"
import { createContext } from "~/server/trpc"

const handler = (req: Request) =>
fetchRequestHandler({
endpoint: "/api/trpc",
req,
router: appRouter,
createContext
})

export { handler as GET, handler as POST }
import { fetchRequestHandler } from "@trpc/server/adapters/fetch"
import { appRouter } from "~/server/routers/_app"
import { createContext } from "~/server/trpc"

const handler = (req: Request) =>
fetchRequestHandler({
endpoint: "/api/trpc",
req,
router: appRouter,
createContext
})

export { handler as GET, handler as POST }
4 replies