Open abegehr opened 1 day ago
Running with npm run dev
works fine:
Running dist with npm run preview
fails:
Console:
anton@Mac github-iad8ez % npm run dev
> @example/minimal@0.0.1 dev
> astro dev
10:10:53 [types] Generated 1ms
astro v4.16.13 ready in 91 ms
┃ Local http://localhost:4321/
┃ Network use --host to expose
10:10:53 watching for file changes...
10:10:55 [500] / 38ms
myAction() test1
10:10:57 [302] POST / 15ms
10:10:57 [500] / 3ms
^C
anton@Mac github-iad8ez % npm run preview
> @example/minimal@0.0.1 preview
> astro preview
10:11:43 [@astrojs/node] Server listening on http://localhost:4321
myAction() test2
Astro Info
If this issue only occurs in one browser, which browser is a problem?
I've tested on Safari and Chrome and occurs on both.
Describe the Bug
Astro.getActionResult()
: https://docs.astro.build/en/guides/actions/#handle-form-action-errorsWhat's the expected result?
I would expect the node adapter to handle action error the same as the dev mode.
To repro the issue, build and preview:
npm run build
andnpm run preview
to host astro on the standalone node adapter. The issue also occurs on the node middleware adapter, which is what I'm using.Link to Minimal Reproducible Example
https://stackblitz.com/edit/github-iad8ez
Participation