Everything works just fine in the development, but on Vercel deploy, I can't access the page.
Answered
sh1ro posted this in #help-forum
sh1roOP
I have this error message:
I can't access the page that should render
Error: ENOENT: no such file or directory, scandir
I can't access the page that should render
.mdx
in the contents
folder. How should I fix it? The [detail Github repo](https://github.com/Coder-Blue/noah-blog)Answered by sh1ro
No one helped so I tried many method on the NextJS Github issues, somehow it works? IDK how =))))
But anyway, I just need to change to the
Thanks for patiently helping me!
But anyway, I just need to change to the
getMDXData(path.resolve(process.cwd(), "src/contents")
, and move all the .mdx
contents to the main root src
directory instead of the app
directory.Thanks for patiently helping me!
12 Replies
sh1roOP
In the [Deploy version](https://noah-pblog.vercel.app/en/blog/post/faq/faq-1) or any
.mdx
related route, only giving me the Error: 500
.sh1roOP
@B33fb0n3
Here
Ah yea, I saw this thread. However, I am not sure if the scanning of dirs is supported on vercel. If I would guess, it's not supported
sh1roOP
Some guys actually try to get it work on Next 14. I'm trying to replicate their projects' result, and idk it can't work. How would they do that, idk either?
If I would be you, I would save my blog posts inside a database (and a link to my MDX file as well) and my
getBlogPosts
would return a chunk of recent blogssh1roOP
Oh and somehow, it work with the
privacy-policy
and terms-and-services
, but not with the [slug]
contents.Not the way I really want to, I want to load it local.
yea, I thought so too. I guess I am not the right person to solve this thread
sh1roOP
Sorry for the inconvenience, but thanks for helping.
np, I thought you will open another thread and didn't expected that you already had an open thread
sh1roOP
No one helped so I tried many method on the NextJS Github issues, somehow it works? IDK how =))))
But anyway, I just need to change to the
Thanks for patiently helping me!
But anyway, I just need to change to the
getMDXData(path.resolve(process.cwd(), "src/contents")
, and move all the .mdx
contents to the main root src
directory instead of the app
directory.Thanks for patiently helping me!
Answer