Netlify didnt build my markdown files (vercel same issue)

however, it can fetch the front matter like the title of the markdown file, but when i try to click into the page…it says 500 internal server error.

the log gives the error message that there’s no such directory / file.

does anyone know how to fix this? i tried it on vercel, and also got the same issue.

thanks a lot!

If your issue span across multiple platforms, it sounds like something might be misconfigured in the project. We can try to take a look once you provide your site name and steps to reproduce the issue.

Hello! I moved my post folder containing the markdown files into public folder, so now the folder/markdown files are built.

However, it still returns “no such file or directory” in production mode.

In dev mode, this works:

const folder = “public/posts/”
const file = ${folder}${slug}.md

but since i know public doesnt work in built… so even if “/posts/” it still doesnt work.

We still need this info.

here’s the site: []

You mostly need to read this thread: File system issue for api / trying to fs.readFileSync dynamically - #11 by hrishikesh

hey there, thanks! I’ve fixed the problem by adding the link to included_files in the netlify.toml

Excellent, glad you were able to resolve this! Thanks for following up!