adrianhajdin / zoom-clone

Learn to develop a professional enterprise-ready video conferencing app in hours using Next.js 14, Stream, and Tailwind CSS.
https://jsmastery.pro
905 stars 294 forks source link

Clerk Authentication Part #7

Open Madhannmady07 opened 5 months ago

Madhannmady07 commented 5 months ago

Everything worked fine untill the Clerk Part , due to the change in the version release , I couldn't able to continue the project as same as before , to be precise , i was getting this error ....

Attempted import error: 'createRouteMatcher' is not exported from '@clerk/nextjs/server' (imported as 'createRouteMatcher').

./middleware.ts Attempted import error: 'clerkMiddleware' is not exported from '@clerk/nextjs/server' (imported as 'clerkMiddleware').

it's showing it has no such modules to export.

, can someone tell me how to install "Clerk Version 5" ? or how to solve this error , bcuz in the video he was using a different way (i mean diff middleware.ts file ) and now it is showing authMiddleware ... this stresses me up , someone help me

PhungHoang1909 commented 5 months ago

you can try installing this in the terminal: npm install @clerk/nextjs@beta

Madhannmady07 commented 5 months ago

can u provide me your middleware.ts file , because in my file , it says authMiddleware is deprecated , how to resolve this properly?

aditya-2k23 commented 5 months ago

As @PhungHoang1909 suggested, installing the clerk's beta version solved the problem. npm install @clerk/nextjs@beta You can use clerkMiddleware() instead of authMiddleware() createRouteMatcher also works in the beta version of clerk.

kunalborkar2001 commented 5 months ago

As @PhungHoang1909 suggested, installing the clerk's beta version solved the problem. npm install @clerk/nextjs@beta You can use clerkMiddleware() instead of authMiddleware() createRouteMatcher also works in the beta version of clerk.

Its Out dated just. Use middleware.js from my repo and please give it a star 🌟

Anand3125 commented 4 months ago

Thanks @PhungHoang1909 for this suggestion- installing the clerk's beta version really solved the problem. npm install @clerk/nextjs@beta You can use clerkMiddleware() instead of authMiddleware() createRouteMatcher also works in the beta version of clerk. till now i am not getting problems it really works .