threads
threads copied to clipboard
Error: Clerk: auth() was called but it looks like you aren't using `authMiddleware` in your middleware file.
Unhandled Runtime Error
Error: Clerk: auth() was called but it looks like you aren't using authMiddleware
in your middleware file. Please use authMiddleware
and make sure your middleware matcher is configured correctly and it matches this route or page. See https://clerk.com/docs/quickstarts/get-started-with-nextjs
The middleware.ts is on same level as app
not able to figureout what is the issue if someone can help tha would be really greatfull
Did you find solution for this?
Same problem here. Changed to node 20.1.0 and worked.
Same problem here. Changed to node 20.1.0 and worked.
Yes, This worked, noticed you have to use the right npm package when working with clerk, some are not compatible with the latest version using version node 18.0.0 will initialize your nextjs but won't work with the api routing and authmiddleware, but when tested on new version (20.1.0) it worked.
- nvm install 20.1.0
if you don't want to add it permanently to your bash after closing your terminal.
you can use it again with (nvm use 20.1.0) when working on a new terminal to prevent the authmiddleware error.
i installed (upgraded) node by downloading it from their site, then re ran my project, but it does'nt still work, can anyone provide a more detailed way to resolve this issue? thanks!
i installed (upgraded) node by downloading it from their site, then re ran my project, but it does'nt still work, can anyone provide a more detailed way to resolve this issue? thanks!
make sure your middleware.ts is at the root directory, then if you are using clerk@latest install nvm i 20.1.0. confirm by checking the node -v , it must be node v - 20.1.0 . check middleware configuration and re run
honestly tried these and still isnt working, have you completed the project? so i could get like a starter file and all ill have to do is npm i
honestly tried these and still isnt working, have you completed the project? so i could get like a starter file and all ill have to do is npm i
which project exactly? what's your node version, nextjs version and clerk version
the threads project. my node is 20.3.1, my next is 13.5.4 and my clerk is 4.25.2 i used npm and npx to check all these versions, although currently, i copied JSM's package.json, to try to fix my error and did all sorts and it didnt work.
the threads project. my node is 20.3.1, my next is 13.5.4 and my clerk is 4.25.2 i used npm and npx to check all these versions, although currently, i copied JSM's package.json, to try to fix my error and did all sorts and it didnt work.
the threads project, okay use: Next: 13.4.19 Node: 20.1.0 clerk: 4.25.1
is a more stable version.
the threads project. my node is 20.3.1, my next is 13.5.4 and my clerk is 4.25.2 i used npm and npx to check all these versions, although currently, i copied JSM's package.json, to try to fix my error and did all sorts and it didnt work.
the threads project. my node is 20.3.1, my next is 13.5.4 and my clerk is 4.25.2 i used npm and npx to check all these versions, although currently, i copied JSM's package.json, to try to fix my error and did all sorts and it didnt work.
the threads project, okay use: Next: 13.4.19 Node: 20.1.0 clerk: 4.25.1
is a more stable version.
I am running this project as well and here is the versions I am using "@clerk/nextjs": "^4.25.3", "next": "13.5.4", Node: v20.8.0
I was getting the error trying several version combos on this one, my problem was I am using a source folder and had the middleware file in the root dir, once I moved it to the src folder everything worked as expected.
I'm following Antonio's AI companion tutorial and this got me completely stuck.. Tried all the node versions, no idea what will solve this. Anyone had any luck on this particular project? middleware ts is on the same level as the app folder, node v is 20.1.0.. everything seems right.
I'm following Antonio's AI companion tutorial and this got me completely stuck.. Tried all the node versions, no idea what will solve this. Anyone had any luck on this particular project? middleware ts is on the same level as the app folder, node v is 20.1.0.. everything seems right.
![]()
bro have u got the solution?
Im stuck on:
node: 20.11.0 clerk: 4.29.9 next: 14.1.3
This is really frustrating. As for now I just disabled authentication by removing the middleware part from /api/uploadthing/core.ts
as onUploadComplete
doesn't do much with user data anyway. Obviously this is not production ready since it doesn't authenticate the user when uploading stuff... but whatever, its just educational course 👍
This is what you get when you create tutorials with xxx@latests
😮💨 if it works at time when @adrianhajdin creates it, it might not work on latest packages 🤷