Error handling upgrade request TypeError: Cannot read properties of undefined (reading 'bind')
Unanswered
Redhead posted this in #help-forum
RedheadOP
I'm having an issue where after starting the dev server for nextjs I will frequently get the same error message every few seconds. I am running the following versions:
"@clerk/backend": "^1.13.1"
"@clerk/nextjs": "^5.5.5"
"next": "14.2.12"
The issue does go away if I update my middleware.ts file to be much more specific but when using the config from the clerk docs I receive the above errors.
I did first create a support ticket w/ Clerk here: https://discord.com/channels/856971667393609759/1285718263208218655 but was ultimately redirected here.
This is occurring when using the base clerk quickstart (with updated versions of the packages) that can be found here: https://github.com/clerk/clerk-nextjs-app-quickstart and contains the following middleware:
The issue occurs immediately after running
If any more information is helpful please let me know 🙂
"@clerk/backend": "^1.13.1"
"@clerk/nextjs": "^5.5.5"
"next": "14.2.12"
The issue does go away if I update my middleware.ts file to be much more specific but when using the config from the clerk docs I receive the above errors.
I did first create a support ticket w/ Clerk here: https://discord.com/channels/856971667393609759/1285718263208218655 but was ultimately redirected here.
This is occurring when using the base clerk quickstart (with updated versions of the packages) that can be found here: https://github.com/clerk/clerk-nextjs-app-quickstart and contains the following middleware:
import { clerkMiddleware } from "@clerk/nextjs/server";
// This Middleware does not protect any routes by default.
// See https://clerk.com/docs/references/nextjs/clerk-middleware for more information about configuring your Middleware
export default clerkMiddleware();
export const config = {
matcher: [
// Skip Next.js internals and all static files, unless found in search params
"/((?!_next|[^?]*\\.(?:html?|css|js(?!on)|jpe?g|webp|png|gif|svg|ttf|woff2?|ico|csv|docx?|xlsx?|zip|webmanifest)).*)",
// Always run for API routes
"/(api|trpc)(.*)",
],
};
The issue occurs immediately after running
npm run dev
.If any more information is helpful please let me know 🙂
1 Reply
RedheadOP
Also not sure if helpful but when running
npx envinfo --system --browsers --binaries --npmPackages
I get the following result: System:
OS: macOS 15.0
CPU: (8) arm64 Apple M1 Pro
Memory: 44.55 MB / 16.00 GB
Shell: 5.9 - /bin/zsh
Binaries:
Node: 22.2.0 - ~/.nvm/versions/node/v22.2.0/bin/node
npm: 10.7.0 - ~/.nvm/versions/node/v22.2.0/bin/npm
pnpm: 9.10.0 - /opt/homebrew/bin/pnpm
Browsers:
Brave Browser: 128.1.69.162
Chrome: 128.0.6613.138
Safari: 18.0
npmPackages:
@clerk/nextjs: ^5.5.5 => 5.5.5
@types/node: latest => 22.5.5
@types/react: latest => 18.3.7
@types/react-dom: latest => 18.3.0
autoprefixer: latest => 10.4.20
eslint: latest => 8.57.1
eslint-config-next: 14.2.8 => 14.2.8
next: 14.2.12 => 14.2.12
postcss: latest => 8.4.47
react: ^18.3.1 => 18.3.1
react-dom: ^18.3.1 => 18.3.1
tailwindcss: latest => 3.4.12
typescript: latest => 5.6.2