#No HTML file in output (aborted on generating static routes)
23 messages · Page 1 of 1 (latest)
No HTML file in output
build log:
03:25:44 PM [content] No content directory found. Skipping type generation.
03:25:44 PM [build] output target: static
03:25:44 PM [build] Collecting build info...
03:25:44 PM [build] Completed in 62ms.
03:25:44 PM [build] Building static entrypoints...
03:25:45 PM [build] Completed in 0.98s.
building client
Completed in 1.54s.
generating static routes
Hi @brisk juniper does this happen every time you build? (also, just to check: you don't have an adapter configured, do you?)
yep it happens every time , also my config looks liks this
import { defineConfig } from "astro/config";
import react from "@astrojs/react";
import tailwind from "@astrojs/tailwind";
import sanity from "@sanity/astro";
import sitemap from '@astrojs/sitemap';
export default defineConfig({
integrations: [
sitemap(),
react(),
tailwind({
applyBaseStyles: false,
}),
sanity({ ... })
],
});
thanks. that looks fine to me. is your project open-source, or do you have a minimal example of this? I'll try setting this up locally too. it seems like a bug, so we just need to find what might be triggering it
i'm gonna make a minnal version
oh wait i kinda see whats going on, the build process just aborted after generating static routes, should be something like this and says Complete!
maybe theres a build error but didnt get printed out?
weird. looks like it 🤔
interesting, after throwing all the pages to trash can and create a new index.astro with <h1>hey</h1>, it starts working again

leme try deleting one by one
I had the same problem and posted it here. Maybe that will help https://discord.com/channels/830184174198718474/1146556928856707133
i made a minimal example to reproduce it here, if you comment L1 then it works
https://github.com/Gary50613/astro-min/blob/master/src/components/Header.astro#L4
same thing will happen if you replace header.astro to this:
---
import image from "../assets/ferris-rust.png";
import { getImage } from "astro:assets";
export const logo = await getImage({
src: image
});
// just aborted here
---
<div/>
but if you remove the export keyword then it works again:
---
import image from "../assets/ferris-rust.png";
import { getImage } from "astro:assets";
// next line diff
const logo = await getImage({
src: image
});
// build pass!
---
<div/>
No HTML file in output (aborted on generating static routes)
exporting things get's really tricky, so it's best to avoid it
doesn't explain that header example though 🤔
I'm not sure why it happened
, but I'll pay more attention to exporting things next time. Thank you for your help! 
https://discord.com/channels/830184174198718474/1146556928856707133 As mentioned here, it will probably go away if you replace "../assets/ferris-rust.png" with "/assets/ferris-rust.png"
Your case is inside Markdown, while mine is in an Astro file. Perhaps the path resolution logic isn't the same?