Skip to content

Using Fonts and CloudFlare Adapter causes an Expected miniflare to be defined error #15524

@asdfjkalsdfla

Description

@asdfjkalsdfla

Astro Info

Astro                    v6.0.0-beta.11
Vite                     v7.3.1
Node                     v24.13.1
System                   macOS (arm64)
Package Manager          pnpm
Output                   static
Adapter                  @astrojs/cloudflare (v13.0.0-beta.7)
Integrations             none

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

No response

Describe the Bug

When using the fonts API with cloudflare adapter, I get a [ERROR] [vite] Internal server error: Expected miniflare to be defined when I load the index page when in dev mode.

Full stack trace

15:13:05 [ERROR] [vite] Internal server error: Expected `miniflare` to be defined
      at get miniflare (ossified-halo/node_modules/.pnpm/@[email protected][email protected][email protected][email protected]_@[email protected]_/node_modules/@cloudflare/vite-plugin/dist/index.mjs:1734:3)
      at ossified-halo/node_modules/.pnpm/@[email protected][email protected][email protected][email protected]_@[email protected]_/node_modules/@cloudflare/vite-plugin/dist/index.mjs:26347:18
      at ossified-halo/node_modules/.pnpm/@[email protected][email protected][email protected][email protected]_@[email protected]_/node_modules/@cloudflare/vite-plugin/dist/index.mjs:1593:25
      at call (ossified-halo/node_modules/.pnpm/[email protected]/node_modules/vite/dist/node/chunks/config.js:10605:5)
      at next (ossified-halo/node_modules/.pnpm/[email protected]/node_modules/vite/dist/node/chunks/config.js:10558:4)
      at ossified-halo/node_modules/.pnpm/[email protected]/node_modules/vite/dist/node/chunks/config.js:22365:28
      at viteServeStaticMiddleware (ossified-halo/node_modules/.pnpm/[email protected]/node_modules/vite/dist/node/chunks/config.js:22451:4)
      at call (ossified-halo/node_modules/.pnpm/[email protected]/node_modules/vite/dist/node/chunks/config.js:10605:5)
      at next (ossified-halo/node_modules/.pnpm/[email protected]/node_modules/vite/dist/node/chunks/config.js:10558:4)
      at viteServeRawFsMiddleware (ossified-halo/node_modules/.pnpm/[email protected]/node_modules/vite/dist/node/chunks/config.js:22484:10)

What's the expected result?

Pages load.

Link to Minimal Reproducible Example

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

Participation

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

Metadata

Metadata

Assignees

Labels

- P4: importantViolate documented behavior or significantly impacts performance (priority)pkg: astroRelated to the core `astro` package (scope)pkg: cloudflareRelated to the Cloudflare adapter

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions