tRPCttRPC
Powered by
jonastJ
tRPC•14mo ago•
1 reply
jonast

Getting nitro adapter to work

I'm struggling to get my trpc procedures to work using the nitro adapter: https://github.com/michealroberts/trpc-nitro-adapter

I followed the steps here to install nitro:
npx giget@latest nitro nitro-app --install
npx giget@latest nitro nitro-app --install


and added the adapter as described here with a router like this:

export const router = createTRPCRouter({
    hello: publicProcedure.query(async ({ ctx }) => {
        return {
            greeting: "Hello world",
        };
    }),
});
export const router = createTRPCRouter({
    hello: publicProcedure.query(async ({ ctx }) => {
        return {
            greeting: "Hello world",
        };
    }),
});

But when using trpc-playground or calling GET /trpc/hello , I get an error saying
TRPCError: No "query"-procedure on path "trpc/hello"\n    at callProcedure 
TRPCError: No "query"-procedure on path "trpc/hello"\n    at callProcedure 
GitHub
GitHub - michealroberts/trpc-nitro-adapter: A tRPC adapter for the ...
A tRPC adapter for the nitro web server framework. - michealroberts/trpc-nitro-adapter
tRPCJoin
Move Fast & Break Nothing. End-to-end typesafe APIs made easy.
5,015Members
Resources
Recent Announcements

Similar Threads

Was this page helpful?

Similar Threads

Getting CORS error with tRPC express adapter, locally
rhh4x0RRrhh4x0R / ❓-help
16mo ago
Guide to create an adapter
Jonatan OrozcoJJonatan Orozco / ❓-help
3y ago
nodeHTTPHandler with Nitro
alexAalex / ❓-help
2y ago