EDIT: I solved the issue but I'm leaving it here for others:
The problem was that I had changed the folder name from "Cards" to "cards" at some point in order to be consistent, but it didn't update in GitHub, no matter how many times I committed. I changed it back and it worked.
ORIGINAL QUESTION:
I'm trying to build a simple static presentation website with Astro. Everything works fine in development, but when I try to deploy to GitHub pages or Render.com I get this error messages as it tries to build static entry points:
08:14:40 AM [content] No content directory found. Skipping type generation.
08:14:40 AM [build] output target: static
08:14:40 AM [build] Collecting build info...
08:14:40 AM [build] Completed in 149ms.
08:14:40 AM [build] Building static entrypoints...
Could not resolve "../components/cards/BlogCard.astro" from "src/pages/courses.astro"
file: /home/runner/work/cursuri-seo/cursuri-seo/src/pages/courses.astro
error Could not resolve "../components/cards/BlogCard.astro" from "src/pages/courses.astro"
File:
/home/runner/work/cursuri-seo/cursuri-seo/src/pages/courses.astro
Stacktrace:
RollupError: Could not resolve "../components/cards/BlogCard.astro" from " src/pages/courses.astro"
at error (file:///home/runner/work/cursuri-seo/cursuri- seo/node_modules/rollup/dist/es/shared/node-entry.js:2287:30)
at ModuleLoader.handleInvalidResolvedId (file:///home/runner/work/cursuri-seo/cursuri- seo/node_modules/rollup/dist/es/shared/node-entry.js:24778:24)
at file:///home/runner/work/cursuri-seo/cursuri-seo/node_modules/rollup/dist/es/shared/node- entry.js:24740:26
Error: Process completed with exit code 1.`
I really don't understand why the component would not resolve, as it works fine in development.
Here is the component: enter image description here
And here is where it is called from: enter image description here
Actually, it is being called from other pages too, and sometimes the error message points to those. So it's always this BlogCard component that is causing the issue.
I tried to deploy to GitHub pages and I expected the build to work