-
-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FileNotFoundError: File not found: /vercel/path0/blog/{WHAT_EVER}.mdx #127
Comments
Assuming the project works locally? Also, what Node.js version are you running in Vercel and is the repo public where I could take a look? |
Yes, it works locally. |
Thanks for providing a repo! Sorry, I haven't had a chance to look into this deeper. Are the versions of Node.js locally and in Vercel the same? Off the top of my head, I'm not sure why the TypeScript compiler can't find those specifically in Vercel 🤔 |
I'm also having this issue, it seems like Next.js automatically "removes" unnecessary files & folders, in this case - the root Btw: you can also build on your local machine and inspect the I'm still looking for ways to figure out how to solve this issue. In the meantime, use SSG to prebuild your blog pages as static files. Then we need to "ignore" |
Update: I moved the root before: import { createSource } from "mdxts";
export const allBlog = createSource("**/*.mdx", {
baseDirectory: "blog",
basePathname: "/blog",
sort: (a, b) => b.frontMatter.date.localeCompare(a.frontMatter.date),
}); After: import { createSource } from "mdxts";
export const allBlog = createSource("**/*.mdx", {
baseDirectory: "_blog", // <-- Change this
basePathname: "/blog",
sort: (a, b) => b.frontMatter.date.localeCompare(a.frontMatter.date),
}); I have not seeing Vercel log errors ✨ Can you try if this helps? |
@fluid-design-io thank you for looking into this! This makes much more sense now, I didn't realize this happened when it wasn't static. This might be fixed by specifying the directory with outputFileTracingRoot in your next config. |
I'm hitting the issue in a similar fashion. Problem basically being: the library expects all files to be there but they aren't. No way of fiddling with the options seems to work or include any of the files |
I feel like ultimately the way renoun is interaction with bundlers isn't sufficient right now. It seems like |
@hipstersmoothie what version are you on? Assuming you are targeting files outside of the workspace? I still haven't run into this personally. Not sure why it hasn't been an issue for me. In Vercel's project settings I have this option checked: |
I get this error in vercel FileNotFoundError: File not found: /vercel/path0/blog/{WHAT_EVER}.mdx
FileNotFoundError: File not found: /vercel/path0/blog/gunluk-meditasyonun-faydalari-ve-uygulama-yontemleri.mdx at DirectoryCoordinator.addSourceFileAtPath (/var/task/node_modules/ts-morph/dist/ts-morph.js:19088:19) at Project.addSourceFileAtPath (/var/task/node_modules/ts-morph/dist/ts-morph.js:20551:51) at /var/task/.next/server/chunks/73.js:33:45040 at Array.forEach (<anonymous>) at Q (/var/task/.next/server/chunks/73.js:33:44893) at m (/var/task/.next/server/chunks/73.js:30:36103) at /var/task/.next/server/app/[slug]/page.js:1:4398 { path: '/vercel/path0/blog/gunluk-meditasyonun-faydalari-ve-uygulama-yontemleri.mdx', code: 'ENOENT', page: '/gunluk-meditasyonun-faydalari-ve-uygulama-yontemleri2' }
The text was updated successfully, but these errors were encountered: