#getting 404 for ssr page /contact on netlify - astro v5 beta

35 messages · Page 1 of 1 (latest)

humble oxide
deep moon
#

you need an output property in the defineConfig function

#
import { defineConfig } from 'astro/config';
 import netlify from '@astrojs/netlify';

 export default defineConfig({
    // ...
    output: 'hybrid',
    adapter: netlify(),
 });
humble oxide
#

i'm using v5 beta, "hybrid" doesn't seem to be a thing

tacit jolt
#

Try putting export const prerender = false after your imports. Not sure if that's it, but I've only ever seen it after the imports

humble oxide
#

moved it unfortunatelly didn't work

deep moon
#

oh sorry didn't realize you were using v5

humble oxide
#

no worries i forgot to specify it

tacit jolt
#

Any logs in netflify?

#

runtime and/or build

humble oxide
#

no errors or relevant warnings while building

#

runtime only printing classic 404

#

just tried the to reproduce it with blog template I wasn't able. It works there.

deep moon
#

does it load on netlify if you remove the export const prerender = false;?

humble oxide
#

yes path exists if its prerendered

#

weird thing is that i cannot do the faulty route on blog template not sure why

humble oxide
#

I can reproduce also with blog template now, I could be doing something wrong last time.

#

Using netlify-cli doesn't seem to make difference compared to UI

humble oxide
#

have tried to reproduce it with blog template on hybrid config with latest v4 but I wasn't able, it just works

#

Couldn't be that netlify integration didn't catch up with beta yet?

#

getting 404 for ssr page /contact on netlify - astro v5 beta

humble oxide
#

I tried with vercel adapter: getting build err on vercel: [ERROR] [sync] AstroUserError: output: "server" or output: "hybrid" is required to use the serverless adapter.

deep moon
#

i never used v5 until now. Really confusing why it doesn't work with the default hybrid

humble oxide
#

tried the output:server with prerender=true, it works so i have workaround for my page but as you say its weird

#

i suspect either missing support (bug) in adapters or missing documentation, I also watched bholmes on learningWithJason in video doing the output=static prerender=false but they haven't deployed just showed on dev server

#

I'll open an issue tomorrow see what they think of it

#

thanks for your help btw! appreciate it

deep moon
#

good luck. I'm curious if anyone has deployed v5 to netlify without output set to server

lofty vector
#

<li><a class="block p-2" href="/#about">About me</a></li>
<li><a class="block p-2" href="/#projects">Projects</a></li>
<li><a class="block p-2" href="/contact">Contact</a></li>

#

notice the difference?

#

wait no never mind, I was seeing stuff via changing that link but it wasnt the contact lol

tacit jolt