Alright I think I figured it out and got it building locally. Not sure if this is from the template or not but it looks like you're using a mdx.tsx component file, passing in CustomMDX, and exporting your custom components from there. To fix the error you'll need to import badge.tsx and assign it to the components object.
1// /components/mdx.tsx23import { Badge } from "./badge"45let components = {6 h1: createHeading(1),7 h2: createHeading(2),8 h3: createHeading(3),9 h4: createHeading(4),10 h5: createHeading(5),11 h6: createHeading(6),12 Image: RoundedImage,13 a: CustomLink,14 code: Code,15 Table,16+ Badge,17}
From here you can remove the mdx-components global file since you're using a different approach. Again not sure if this is legacy from a template, but I'd eventually recommend using the mdx-components approach instead as it makes your components available to all MDX files automatically and is also how Next .js recommends.
Oh also you can remove the import from the post mdx file itself since your making the components available through the above approach.