Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Astro5 + Starlight + Cloudflare] Cannot build with Starlight and Cloudflare adapter #484

Open
1 task
GoodLucky777 opened this issue Dec 15, 2024 · 0 comments

Comments

@GoodLucky777
Copy link

Astro Info

Astro                    v5.0.5
Node                     v18.20.3
System                   Linux (x64)
Package Manager          unknown
Output                   static
Adapter                  @astrojs/cloudflare
Integrations             @astrojs/starlight

Describe the Bug

If I try to build the Astro 5 website with Starlight and Cloudflare adapter, the build error will occurs.

Build error log:

$ npm run build

00:47:37 [build] Building static entrypoints...
00:47:38 [ERROR] [vite] x Build failed in 636ms
[commonjs--resolver] [plugin vite:resolve] Cannot bundle Node.js built-in "node:path" imported from "node_modules/@astrojs/starlight/utils/collection.ts". Consider disabling environments.ssr.noExternal or remove the built-in dependency.
  Stack trace:
    at getRollupError (file:///home/projects/astro5-starlight-cloudflare-build-error/node_modules/rollup/dist/es/shared/parseAst.js:558:41)
    at error (file:///home/projects/astro5-starlight-cloudflare-build-error/node_modules/rollup/dist/es/shared/node-entry.js:20652:33)
    at handler (file:///home/projects/astro5-starlight-cloudflare-build-error/node_modules/vite/dist/node/chunks/dep-yUJfKD1i.js:50867:15)
    at then/< (https://astro5starlightcloudflarebuild-el3s.w-corp-staticblitz.com/blitz.c8c182a3.js:40:23197)

What's the expected result?

No build errors.

Link to Minimal Reproducible Example

https://stackblitz.com/edit/astro5-starlight-cloudflare-build-error

Participation

  • I am willing to submit a pull request for this issue.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant