withastro / astro

The web framework for content-driven websites. ⭐️ Star to support our work!
https://astro.build
Other
46.81k stars 2.49k forks source link

[Windows] error: script "preview" exited with code 1 #11958

Closed jonaspm closed 2 months ago

jonaspm commented 2 months ago

Astro Info

Astro                    v4.15.4
Node                     v22.6.0
System                   Windows (x64)
Package Manager          bun
Output                   server
Adapter                  @astrojs/node
Integrations             none

If this issue only occurs in one browser, which browser is a problem?

NA

Describe the Bug

Error displayed:

astro preview
22:07:36 [WARN] [config] The adapter @astrojs/node provides experimental support for "astro:env getSecret". You may experience issues or breaking changes until this feature is fully supported by the adapter.
Unexpected while resolving package "@astrojs/node/preview.js" from "C:\Users\jonaspm\Downloads\withastro-astro-cm97e8\"
error: script "preview" exited with code 1

I am using Bun v1.1.27 (not Node) over Windows 11 x64. hybrid and server output does not work.

bun run build works bun run preview does not work bunx astro preview does not work

What's the expected result?

App build should be started normally.

Link to Minimal Reproducible Example

https://stackblitz.com/edit/withastro-astro-cm97e8

Participation

bluwy commented 2 months ago

Does this only happen in Bun? If so, it should probably be reported to Bun.

jonaspm commented 2 months ago

Does this only happen in Bun? If so, it should probably be reported to Bun.

Yes, I tested with Node v20.17.0 and it works.

bluwy commented 2 months ago

Thanks. In that case you can report this issue to Bun then as we don't have explicit support for Bun, but Bun is documented to have full node compatibility, so this could be a node compatibility issue on their end.