Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug: Failed to parse procedure, couldn't parse node #104

Open
dBianchii opened this issue Apr 25, 2024 · 4 comments
Open

bug: Failed to parse procedure, couldn't parse node #104

dBianchii opened this issue Apr 25, 2024 · 4 comments

Comments

@dBianchii
Copy link

image

@diegoasanch
Copy link

diegoasanch commented Apr 26, 2024

I'm having the same error.

 ○ Compiling /api/panel ...
 ✓ Compiled /api/panel in 1270ms (395 modules)
trpc-panel: Failed to parse procedure test, Couldn't parse node.
trpc-panel: Failed to parse procedure joinWaitlist, Couldn't parse node.
trpc-panel: Failed to parse procedure , Router doesn't have any successfully parsed children.

These are the relevant dependency versions from my package.json

{ 
  "dependencies": {
    "@tanstack/react-query": "^5.29.0",
    "@trpc/client": "11.0.0-rc.334",
    "@trpc/next": "11.0.0-rc.334",
    "@trpc/react-query": "11.0.0-rc.334",
    "@trpc/server": "11.0.0-rc.334",
    "next": "14.1.4",
    "superjson": "^2.2.1",
    "trpc-panel": "^1.3.4",
    "zod": "^3.22.4"
  }
}

And pages/api/panel.ts

import { appRouter } from '@/server/routers/_app'
import type { NextApiRequest, NextApiResponse } from 'next'
import { renderTrpcPanel } from 'trpc-panel'

export default async function handler(_: NextApiRequest, res: NextApiResponse) {
  res.status(200).send(
    renderTrpcPanel(appRouter, {
      url: 'http://localhost:3001/api/trpc',
      transformer: 'superjson',
    }),
  )
}

@diegoasanch
Copy link

For me downgrading tRPC to 10.45.2 and @tanstack/react-query to4.18.0 fixed it

{
    "@tanstack/react-query": "^4.18.0",
    "@trpc/client": "^10.45.2",
    "@trpc/next": "^10.45.2",
    "@trpc/react-query": "^10.45.2",
    "@trpc/server": "^10.45.2",
}

@MinskLeo
Copy link

@diegoasanch @dBianchii Possible solution for your case in separate issue: #95

@kevinssheva
Copy link

I have the same issues

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants