web
web2w ago

NextJs Setup: `useContext is not a function`

Env: Bun 1.1.10 This morning I started following this guide to setup tRPC in my existing NextJs project https://trpc.io/docs/client/nextjs/setup I haven't made any changes that differ from the guide, but I am getting this error when I visit the page that has a component using tRPC. My LSP is working as expected, no obvious errors or even warnings in my code. Here's a whole list of my dependencies:
"dependencies": {
"@libsql/client": "^0.6.0",
"@tanstack/react-query": "^5.40.1",
"@trpc/client": "^11.0.0-rc.390",
"@trpc/next": "^11.0.0-rc.390",
"@trpc/react-query": "^11.0.0-rc.390",
"@trpc/server": "^11.0.0-rc.390",
"axios": "^1.7.2",
"better-sqlite3": "^11.0.0",
"drizzle-orm": "^0.31.0",
"libsql": "^0.3.18",
"next": "14.2.3",
"puppeteer": "^22.10.0",
"react": "^18",
"react-dom": "^18",
"zod": "^3.23.8"
},
"dependencies": {
"@libsql/client": "^0.6.0",
"@tanstack/react-query": "^5.40.1",
"@trpc/client": "^11.0.0-rc.390",
"@trpc/next": "^11.0.0-rc.390",
"@trpc/react-query": "^11.0.0-rc.390",
"@trpc/server": "^11.0.0-rc.390",
"axios": "^1.7.2",
"better-sqlite3": "^11.0.0",
"drizzle-orm": "^0.31.0",
"libsql": "^0.3.18",
"next": "14.2.3",
"puppeteer": "^22.10.0",
"react": "^18",
"react-dom": "^18",
"zod": "^3.23.8"
},
No description
0 Replies
No replies yetBe the first to reply to this messageJoin