You're getting this error because in Next.js 13+ (App Router), params can be asynchronous in dynamic routes. To fix this, you need to await params before accessing its properties.
Wrong: const providerId = await context.params.providerId;
Fixed: const { providerId } = await context.params;