#updated old project, tried to push to vercel, broke [slug] somehow

8 messages · Page 1 of 1 (latest)

untold plover
#

So I tried pushing an old project to vercel, had to update dependencies bc of this[kFormat] error and now my slug isn't working anymore. Checked astro migration guide but didn't see any changes that could be problematic.

  const allContent = await Astro.glob("../../content/*.mdx");
  const paths = allContent.map((content) => {
    const slug = getSlugFromPath(content.file);

    return {
      params: { slug },
      props: { content },
    };
  });
  return paths;
}
const { content } = Astro.props;```

When I try to use content.frontmatter.title, it appears to be undefined.
#

updated old project, tried to push to vercel, broke [slug] somehow

proud grail
#

@untold plover could you console.log the allContent object and post it here?

untold plover
#

oh, i think it also might have something to do with this:
getStaticPaths() is ignored when "output: server" is set.

#

yup and i can't change it back to static bc vercel requires the output to be on server

#

aaah i see where i goofed

#

i thought i needed the vercel adapter, but that's only if you want to enable SSR