tRPCttRPC
Powered by
TarkyT
tRPC•3y ago•
8 replies
Tarky

Error while creating a mutation in NextJS

I am having the following error:
"message": "No \"query\"-procedure on path \"checkout.stripe\"",
"code": -32004,
"message": "No \"query\"-procedure on path \"checkout.stripe\"",
"code": -32004,


Here is my code:

import { createTRPCRouter, publicProcedure } from "@/server/api/trpc";

export const checkoutRouter = createTRPCRouter({
  stripe: publicProcedure.mutation(() => {
    return "Hello";
  }),
});
import { createTRPCRouter, publicProcedure } from "@/server/api/trpc";

export const checkoutRouter = createTRPCRouter({
  stripe: publicProcedure.mutation(() => {
    return "Hello";
  }),
});


If I go to
http://localhost:3000/api/trpc/checkout.stripe
http://localhost:3000/api/trpc/checkout.stripe
it throws that error, any ideas?
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

Use mutation trpc with nextJs
Answer OverflowAAnswer Overflow / ❓-help
3y ago
Modify mutation error messages?
Jack FischerJJack Fischer / ❓-help
3y ago
Individual mutation requests error
SnowSSnow / ❓-help
3y ago
Getting strange react error in nextjs
TimeTTime / ❓-help
2y ago