#No HTML file in output (aborted on generating static routes)

23 messages · Page 1 of 1 (latest)

brisk juniper
#

After upgrading to [email protected], when I try to run astro build, it finishes without generating any HTML files. Am I doing something wrong?

#

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 
keen glade
#

Hi @brisk juniper does this happen every time you build? (also, just to check: you don't have an adapter configured, do you?)

brisk juniper
keen glade
#

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

brisk juniper
#

i'm gonna make a minnal version

brisk juniper
#

maybe theres a build error but didnt get printed out?

keen glade
#

weird. looks like it 🤔

brisk juniper
#

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

quaint sluice
brisk juniper
#

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)

keen glade
#

exporting things get's really tricky, so it's best to avoid it

#

doesn't explain that header example though 🤔

brisk juniper
#

I'm not sure why it happened thonk , but I'll pay more attention to exporting things next time. Thank you for your help! 012_Hachi_heart

quaint sluice
brisk juniper