Skip to content

node standalone server does not serve assets (unless you run astro preview) #5093

@bholmesdev

Description

@bholmesdev

What version of astro are you using?

1.5.0

Are you using an SSR adapter? If so, which one?

@astrojs/node

What package manager are you using?

pnpm

What operating system are you using?

Mac

Describe the Bug

The docs say you can run the node server directly when using standalone mode like so:

node ./dist/server/entry.mjs

However, doing so will only start the base server without serving any static assets.
image

Interestingly, astro preview will start this same server with static asset serving, though this nuance isn't documented. Curious if this is a bug or just a documentation issue?

Link to Minimal Reproducible Example

https://stackblitz.com/edit/github-hvcn2g

Participation

  • I am willing to submit a pull request for this issue.

Metadata

Metadata

Assignees

Labels

- P5: urgentFix build-breaking bugs affecting most users, should be released ASAP (priority)

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions