jonast
jonast2w ago

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",
};
}),
});
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
GitHub - michealroberts/trpc-nitro-adapter: A tRPC adapter for the ...
A tRPC adapter for the nitro web server framework. - michealroberts/trpc-nitro-adapter
1 Reply
jonast
jonastOP2w ago
Solved it. Removed trpc/

Did you find this page helpful?