Tutorial issue when making a middleweare

Hi i am, going throught the tuorials and seen to get the following issue

Uncaught Error: The Middleware “/middleware” must export a middleware or a default function

import NextAuth from ‘next-auth’;
import { authConfig } from ‘./auth.config’;

export default NextAuth(authConfig).auth;

export const config = {
// File-system conventions: middleware.js | Next.js
matcher: [‘/((?!api|_next/static|_next/image|.\.png$).)’],
};

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.