jonastJ
tRPC14mo 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

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",
        };
    }),
});

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
GitHub
A tRPC adapter for the nitro web server framework. - michealroberts/trpc-nitro-adapter
Was this page helpful?