cloudflare / cloudflare/workerd

🐛 Bug Report — Runtime APIs

Open
#2,363 1 comment 1 reaction 0 assignees View on GitHub
Dominant language
C++
Stars
8.7k
Forks
739
Avg merge
2d 20h
Merged PRs (30d)
174

Description

### Astro Info

```block
Astro v4.11.5
Node v20.15.0
System Windows (x64)
Package Manager npm
Output server
Adapter @astrojs/cloudflare
Integrations none
```

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

_No response_

### Describe the Bug

I initialize an astro project with:
npm create astro@latest

And add the Cloudflare adapter:
npx astro add cloudflare

Finaly run:
npm run dev

Results in the following error:
*** Received structured exception #0xc0000005: access violation; stack: 7ff89774301f 7ff62208337b 7ff622083443 7ff6220774bc 7ff622077467 7ff6218f7d5e 7ff6218f806f 7ff6207e1706 7ff6207e14ea 7ff621a6f97f 7ff621a76b36 7ff621a6fe9c 7ff621a76b36 7ff621a6d80c 7ff6207d1551 7ff623158bff 7ff8afb7257c 7ff8b07caf27
The Workers runtime failed to start. There is likely additional logging output above.
Stack trace:
at #assembleAndUpdateConfig (C:\it\test\node_modules\miniflare\dist\src\index.js:9178:13)
at async Mutex.runWith (C:\it\test\node_modules\miniflare\dist\src\index.js:3521:16)
at async Miniflare2._getProxyClient (C:\it\test\node_modules\miniflare\dist\src\index.js:9359:5)
at async getPlatformProxy (C:\it\test\node_modules\wrangler\wrangler-dist\cli.js:210460:20)
at async withTakingALongTimeMsg (file:///C:/it/test/node_modules/astro/dist/integrations/hooks.js:23:18)

I was using a node version manager Volta. Tried uninsalling and installing node manualy. Tried also using pnpm. Not found any Issue reported so created one. I think it has to do with the Workerd Runtime for development but I am unsure. As when deploying the project on Cloudflare it works. You can also not run the npm run preview it also gives an error.

I attempted to create a reproductible example but when starting from basic template in StackBlitz and just adding the Cloudflare Adapter it doesn't work but gives the following error instead:
❯ npm run dev

> @example/basics@0.0.1 dev
> astro dev

04:01:54 [WARN] The currently selected adapter `@astrojs/cloudflare` is not compatible with the image service "Sharp".
04:01:54 [WARN] [config] The feature "astro:env getSecret" is experimental and subject to change (used by @astrojs/cloudflare).
04:01:54 [types] Added src/env.d.ts type declarations.
04:02:01 [build] Waiting for integration "@astrojs/cloudflare", hook "astro:server:setup"...
/home/projects/qgnirbojgz.github/node_modules/@cloudflare/workerd-linux-64/bin/workerd: line 17: "foo(" must be followed by )

### What's the expected result?

The expected output is to be able to run a development server.

### Link to Minimal Reproducible Example

unknown

### Participation

- [ ] I am willing to submit a pull request for this issue.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.