Closed Xeffen25 closed 3 months ago
@Xeffen25 I can't seem to reproduce the same behavior. Can you confirm that it happens with an empty Astro project?
@alexanderniebuhr Yes it happens to me in any project I add the astro adaptar to. I can be empty or ave files but it still througs this error at me when trying to run it localy when using the cloudflare adapter at version 11 (any subversion too). I have a public repo called test if you might want to try it out I don't know if it might generate wrong. The only requirement is to have node right? or is there anthing I am missing for workerd?
I think workerd has a bug with Windows 11 right now, the linked issue I posted. They are working on a fix already.
The upstream seems to be fixed.
Im still getting this error using the latest version of astro and cloudflare.
Any updates to fix the error? I have the same error with @astrojs/cloudflare
Any updates to fix the error? I have the same error with @astrojs/cloudflare
I was getting this too as I've been rebuilding from a template and a component was using astro-icon
and i hadn't initialized it as an astro adapter (see), and icon()
was missing below. Once i added the integration, it worked again.
@alexanderniebuhr perhaps this error is misleading where its not catching the right integration that has the issue? And why is it saying @astrojs/cloudflare
is an "integration" in the error? Isn't it an "adapter"
export default defineConfig({
output: 'server',
adapter: cloudflare({
platformProxy: {
enabled: true,
},
}),
integrations: [tailwind(), icon()],
})
Here's the full terminal log when i was working through this
❯ nr dev
$ astro dev
✘ astro v5.0.0-beta.8 is not yet supported in the Community edition of Console Ninja.
We are working hard on it for you https://tinyurl.com/3h9mtwra.
Estimated release dates:
- Community users: around 8th February, 2025 (subject to team availability)
- PRO users: priority access is available now
21:24:20 [WARN] [config] The adapter @astrojs/cloudflare has limited support for "sharp". Certain features may not work as expected.
21:24:20 [types] Generated 1ms
Using vars defined in .dev.vars
21:24:23 [build] Waiting for integration "@astrojs/cloudflare", hook "astro:server:setup"...
^C
❯ ni
bun install v1.1.35-canary.30 (781a392b)
Checked 627 installs across 751 packages (no changes) [329.00ms]
❯ ni
bun install v1.1.35-canary.30 (781a392b)
Checked 627 installs across 751 packages (no changes) [263.00ms]
❯ nr dev
$ astro dev
✘ astro v5.0.0-beta.8 is not yet supported in the Community edition of Console Ninja.
We are working hard on it for you https://tinyurl.com/3h9mtwra.
Estimated release dates:
- Community users: around 8th February, 2025 (subject to team availability)
- PRO users: priority access is available now
21:24:56 [WARN] [config] The adapter @astrojs/cloudflare has limited support for "sharp". Certain features may not work as expected.
21:24:56 [types] Generated 1ms
Using vars defined in .dev.vars
21:24:59 [build] Waiting for integration "@astrojs/cloudflare", hook "astro:server:setup"...
^C
❯ ni
bun install v1.1.35-canary.30 (781a392b)
1 package removed [344.00ms]
❯ nr dev
$ astro dev
✘ astro v5.0.0-beta.8 is not yet supported in the Community edition of Console Ninja.
We are working hard on it for you https://tinyurl.com/3h9mtwra.
Estimated release dates:
- Community users: around 8th February, 2025 (subject to team availability)
- PRO users: priority access is available now
undefined:20
},
^
[Failed to load PostCSS config: Failed to load PostCSS config (searchPath: /Users/am/Coding/example-app): [SyntaxError] Expected double-quoted property name in JSON at position 525
SyntaxError: Expected double-quoted property name in JSON at position 525
at JSON.parse (<anonymous>)
at jsonLoader (file:///Users/am/Coding/example-app/node_modules/vite/dist/node/chunks/dep-D4jOq5eU.js:14124:42)
at Object.search (file:///Users/am/Coding/example-app/node_modules/vite/dist/node/chunks/dep-D4jOq5eU.js:14285:26)]
Node.js v20.12.2
error: script "dev" exited with code 1
❯ nr dev
$ astro dev
✘ astro v5.0.0-beta.8 is not yet supported in the Community edition of Console Ninja.
We are working hard on it for you https://tinyurl.com/3h9mtwra.
Estimated release dates:
- Community users: around 8th February, 2025 (subject to team availability)
- PRO users: priority access is available now
21:26:21 [WARN] [config] The adapter @astrojs/cloudflare has limited support for "sharp". Certain features may not work as expected.
21:26:21 [types] Generated 3ms
Using vars defined in .dev.vars
21:26:24 [build] Waiting for integration "@astrojs/cloudflare", hook "astro:server:setup"...
^C
❯ ni
bun install v1.1.35-canary.30 (781a392b)
Checked 557 installs across 682 packages (no changes) [372.00ms]
❯ nr dev
$ astro dev
✘ astro v5.0.0-beta.8 is not yet supported in the Community edition of Console Ninja.
We are working hard on it for you https://tinyurl.com/3h9mtwra.
Estimated release dates:
- Community users: around 8th February, 2025 (subject to team availability)
- PRO users: priority access is available now
21:26:56 [WARN] [config] The adapter @astrojs/cloudflare has limited support for "sharp". Certain features may not work as expected.
21:26:56 [types] Generated 2ms
Using vars defined in .dev.vars
21:26:59 [build] Waiting for integration "@astrojs/cloudflare", hook "astro:server:setup"...
^C
❯ nr dev
$ astro dev
✘ astro v5.0.0-beta.8 is not yet supported in the Community edition of Console Ninja.
We are working hard on it for you https://tinyurl.com/3h9mtwra.
Estimated release dates:
- Community users: around 8th February, 2025 (subject to team availability)
- PRO users: priority access is available now
21:27:30 [WARN] [config] The adapter @astrojs/cloudflare has limited support for "sharp". Certain features may not work as expected.
21:27:30 [types] Generated 1ms
Using vars defined in .dev.vars
21:27:33 [build] Waiting for integration "@astrojs/cloudflare", hook "astro:server:setup"...
^C
❯ nr dev
$ astro dev
✘ astro v5.0.0-beta.8 is not yet supported in the Community edition of Console Ninja.
We are working hard on it for you https://tinyurl.com/3h9mtwra.
Estimated release dates:
- Community users: around 8th February, 2025 (subject to team availability)
- PRO users: priority access is available now
21:28:08 [WARN] [config] The adapter @astrojs/cloudflare has limited support for "sharp". Certain features may not work as expected.
21:28:08 [types] Generated 1ms
Using vars defined in .dev.vars
21:28:11 [build] Waiting for integration "@astrojs/cloudflare", hook "astro:server:setup"...
^C
❯ ni
bun install v1.1.35-canary.30 (781a392b)
Checked 557 installs across 682 packages (no changes) [241.00ms]
❯ bun i
bun install v1.1.35-canary.30 (781a392b)
warn: incorrect peer dependency "astro@5.0.0-beta.8"
warn: incorrect peer dependency "astro@5.0.0-beta.8"
warn: incorrect peer dependency "astro@5.0.0-beta.8"
+ @astrojs/check@0.9.4
+ @astrojs/mdx@3.1.9
+ @astrojs/tailwind@5.1.2
+ @cloudflare/workers-types@4.20241112.0
+ @types/mdx@2.0.13
+ tailwind-merge@2.5.4
+ tailwindcss@3.4.15
+ typescript@5.6.3
+ wrangler@3.87.0
+ @astrojs/cloudflare@12.0.0-beta.1
+ astro@5.0.0-beta.8
535 packages installed [6.90s]
Blocked 0 postinstall. Run `bun pm untrusted` for details.
❯ nr dev
$ astro dev
✘ astro v5.0.0-beta.8 is not yet supported in the Community edition of Console Ninja.
We are working hard on it for you https://tinyurl.com/3h9mtwra.
Estimated release dates:
- Community users: around 8th February, 2025 (subject to team availability)
- PRO users: priority access is available now
21:28:50 [WARN] [config] The adapter @astrojs/cloudflare has limited support for "sharp". Certain features may not work as expected.
21:28:50 [types] Generated 6ms
Using vars defined in .dev.vars
Using vars defined in .dev.vars
astro v5.0.0-beta.8 ready in 1376 ms
┃ Local http://localhost:4321/
┃ Network use --host to expose
▶ This is a beta prerelease build!
Report issues here: https://astro.build/issues
21:28:51 watching for file changes...
warn - The `content` option in your Tailwind CSS configuration is missing or empty.
warn - Configure your content sources or your generated CSS will be missing styles.
warn - https://tailwindcss.com/docs/content-configuration
21:29:01 [200] / 275ms
21:29:19 Configuration file removed. Restarting...
21:29:19 [vite] changed tsconfig file detected: /Users/am/Coding/example-app/template/tsconfig.json - Clearing cache and forcing full-reload to ensure TypeScript is compiled with updated config values.
21:29:19 [watch] template/public/decapcms/index.html
21:29:19 [watch] template/public/decapcms/index.html
21:29:19 [vite] changed tsconfig file detected: /Users/am/Coding/example-app/_template/tsconfig.json - Clearing cache and forcing full-reload to ensure TypeScript is compiled with updated config values.
21:29:20 [WARN] [config] The adapter @astrojs/cloudflare has limited support for "sharp". Certain features may not work as expected.
21:29:20 [types] Generated 1ms
Using vars defined in .dev.vars
Using vars defined in .dev.vars
21:29:22 [200] / 261ms
21:29:54 [watch] /src/pages/index.astro?astro&type=style&index=0&lang.css
21:29:55 [200] / 8ms
21:31:40 [200] / 23ms
21:33:43 [watch] /src/pages/index.astro?astro&type=style&index=0&lang.css
21:33:43 [ERROR] Cannot find module 'astro-icon/components' imported from '/Users/am/Coding/example-app/src/components/ui/Button.astro'
Stack trace:
at fetchModule (file:///Users/am/Coding/example-app/node_modules/vite/dist/node/chunks/dep-D4jOq5eU.js:53190:19)
at Object.fetchModule (file:///Users/am/Coding/example-app/node_modules/vite/dist/node/chunks/dep-D4jOq5eU.js:32678:63)
at SSRCompatModuleRunner.cachedModule (file:///Users/am/Coding/example-app/node_modules/vite/dist/node/module-runner.js:954:21)
at /Users/am/Coding/example-app/src/components/ui/Button.astro:3:1
at async SSRCompatModuleRunner.directRequest (file:///Users/am/Coding/example-app/node_modules/vite/dist/node/module-runner.js:1043:61)
21:34:05 Configuration file updated. Restarting...
21:34:05 [WARN] [config] The adapter @astrojs/cloudflare has limited support for "sharp". Certain features may not work as expected.
21:34:05 [ERROR] [config] Unable to read /Users/am/Coding/example-app/package.json
Stack trace:
at file:///Users/am/Coding/example-app/node_modules/vitefu/src/index.js:37:11
[...] See full stack trace in the browser, or rerun with --verbose.
Caused by:
Expected double-quoted property name in JSON at position 551
at JSON.parse (<anonymous>)
[...] See full stack trace in the browser, or rerun with --verbose.
21:34:05 [ERROR] Continuing with previous valid configuration
^C
❯ nr dev
$ astro dev
✘ astro v5.0.0-beta.8 is not yet supported in the Community edition of Console Ninja.
We are working hard on it for you https://tinyurl.com/3h9mtwra.
Estimated release dates:
- Community users: around 8th February, 2025 (subject to team availability)
- PRO users: priority access is available now
21:39:51 [WARN] [config] The adapter @astrojs/cloudflare has limited support for "sharp". Certain features may not work as expected.
21:39:51 [types] Generated 3ms
Using vars defined in .dev.vars
21:39:54 [build] Waiting for integration "@astrojs/cloudflare", hook "astro:server:setup"...
^C
❯ ni
bun install v1.1.35-canary.30 (781a392b)
+ @astrojs/check@0.9.4
+ @astrojs/mdx@3.1.9
+ @astrojs/tailwind@5.1.2
+ @cloudflare/workers-types@4.20241112.0
+ @types/mdx@2.0.13
+ tailwind-merge@2.5.4
+ tailwindcss@3.4.15
+ typescript@5.6.3
+ wrangler@3.87.0
+ @astrojs/cloudflare@12.0.0-beta.1
+ astro@5.0.0-beta.8
535 packages installed [5.65s]
Blocked 0 postinstall. Run `bun pm untrusted` for details.
❯ nr dev
$ astro dev
21:40:38 [WARN] [config] The adapter @astrojs/cloudflare has limited support for "sharp". Certain features may not work as expected.
21:40:38 [types] Generated 1ms
Using vars defined in .dev.vars
Using vars defined in .dev.vars
astro v5.0.0-beta.8 ready in 1143 ms
┃ Local http://localhost:4321/
┃ Network use --host to expose
▶ This is a beta prerelease build!
Report issues here: https://astro.build/issues
21:40:38 watching for file changes...
^C^C
❯ ni astro-icon
bun add v1.1.35-canary.30 (781a392b)
installed astro-icon@1.1.2
69 packages installed [2.06s]
❯ nr dev
$ astro dev
✘ astro v5.0.0-beta.8 is not yet supported in the Community edition of Console Ninja.
We are working hard on it for you https://tinyurl.com/3h9mtwra.
Estimated release dates:
- Community users: around 8th February, 2025 (subject to team availability)
- PRO users: priority access is available now
21:41:48 [WARN] [config] The adapter @astrojs/cloudflare has limited support for "sharp". Certain features may not work as expected.
21:41:48 [types] Generated 1ms
Using vars defined in .dev.vars
Using vars defined in .dev.vars
21:41:50 [vite] Re-optimizing dependencies because lockfile has changed
astro v5.0.0-beta.8 ready in 2814 ms
┃ Local http://localhost:4321/
┃ Network use --host to expose
▶ This is a beta prerelease build!
Report issues here: https://astro.build/issues
21:41:50 watching for file changes...
warn - The `content` option in your Tailwind CSS configuration is missing or empty.
warn - Configure your content sources or your generated CSS will be missing styles.
warn - https://tailwindcss.com/docs/content-configuration
21:42:26 [ERROR] Cannot find module 'virtual:astro-icon' imported from '/Users/am/Coding/example-app/node_modules/astro-icon/components/Icon.astro'
Stack trace:
at fetchModule (file:///Users/am/Coding/example-app/node_modules/vite/dist/node/chunks/dep-D4jOq5eU.js:53190:19)
at Object.fetchModule (file:///Users/am/Coding/example-app/node_modules/vite/dist/node/chunks/dep-D4jOq5eU.js:32678:63)
at SSRCompatModuleRunner.cachedModule (file:///Users/am/Coding/example-app/node_modules/vite/dist/node/module-runner.js:954:21)
at /Users/am/Coding/example-app/node_modules/astro-icon/components/Icon.astro:3:1
at async SSRCompatModuleRunner.directRequest (file:///Users/am/Coding/example-app/node_modules/vite/dist/node/module-runner.js:1043:61)
21:44:04 [ERROR] Cannot find module 'virtual:astro-icon' imported from '/Users/am/Coding/example-app/node_modules/astro-icon/components/Icon.astro'
Stack trace:
at fetchModule (file:///Users/am/Coding/example-app/node_modules/vite/dist/node/chunks/dep-D4jOq5eU.js:53190:19)
[...] See full stack trace in the browser, or rerun with --verbose.
21:44:16 [ERROR] Cannot find module 'virtual:astro-icon' imported from '/Users/am/Coding/example-app/node_modules/astro-icon/components/Icon.astro'
Stack trace:
at fetchModule (file:///Users/am/Coding/example-app/node_modules/vite/dist/node/chunks/dep-D4jOq5eU.js:53190:19)
[...] See full stack trace in the browser, or rerun with --verbose.
21:44:19 [ERROR] Cannot find module 'virtual:astro-icon' imported from '/Users/am/Coding/example-app/node_modules/astro-icon/components/Icon.astro'
Stack trace:
at fetchModule (file:///Users/am/Coding/example-app/node_modules/vite/dist/node/chunks/dep-D4jOq5eU.js:53190:19)
[...] See full stack trace in the browser, or rerun with --verbose.
^C
❯ nr dev
$ astro dev
✘ astro v5.0.0-beta.8 is not yet supported in the Community edition of Console Ninja.
We are working hard on it for you https://tinyurl.com/3h9mtwra.
Estimated release dates:
- Community users: around 8th February, 2025 (subject to team availability)
- PRO users: priority access is available now
21:44:41 [WARN] [config] The adapter @astrojs/cloudflare has limited support for "sharp". Certain features may not work as expected.
21:44:41 [types] Generated 2ms
Using vars defined in .dev.vars
Using vars defined in .dev.vars
astro v5.0.0-beta.8 ready in 1385 ms
┃ Local http://localhost:4321/
┃ Network use --host to expose
▶ This is a beta prerelease build!
Report issues here: https://astro.build/issues
21:44:42 watching for file changes...
warn - The `content` option in your Tailwind CSS configuration is missing or empty.
warn - Configure your content sources or your generated CSS will be missing styles.
warn - https://tailwindcss.com/docs/content-configuration
21:44:43 [ERROR] Cannot find module 'virtual:astro-icon' imported from '/Users/am/Coding/example-app/node_modules/astro-icon/components/Icon.astro'
Stack trace:
at fetchModule (file:///Users/am/Coding/example-app/node_modules/vite/dist/node/chunks/dep-D4jOq5eU.js:53190:19)
at Object.fetchModule (file:///Users/am/Coding/example-app/node_modules/vite/dist/node/chunks/dep-D4jOq5eU.js:32678:63)
at SSRCompatModuleRunner.cachedModule (file:///Users/am/Coding/example-app/node_modules/vite/dist/node/module-runner.js:954:21)
at /Users/am/Coding/example-app/node_modules/astro-icon/components/Icon.astro:3:1
at async SSRCompatModuleRunner.directRequest (file:///Users/am/Coding/example-app/node_modules/vite/dist/node/module-runner.js:1043:61)
^C
❯
❯ bun astro add astro-icon
$ astro add astro-icon
✘ astro v5.0.0-beta.8 is not yet supported in the Community edition of Console Ninja.
We are working hard on it for you https://tinyurl.com/3h9mtwra.
Estimated release dates:
- Community users: around 8th February, 2025 (subject to team availability)
- PRO users: priority access is available now
⚠ astro-icon is not an official Astro package.
✔ Continue? … yes
✔ Resolving with third party packages...
Astro will run the following command:
If you skip this step, you can always run it yourself later
╭────────────────────────────╮
│ bun add astro-icon@^1.1.2 │
╰────────────────────────────╯
✔ Continue? … yes
✔ Installing dependencies...
Astro will make the following changes to your config file:
╭ astro.config.mjs ─────────────────────────────╮
│ // @ts-check │
│ import { defineConfig } from 'astro/config' │
│ │
│ import cloudflare from '@astrojs/cloudflare' │
│ import tailwind from '@astrojs/tailwind' │
│ │
│ import icon from 'astro-icon'; │
│ │
│ // https://astro.build/config │
│ export default defineConfig({ │
│ output: 'server', │
│ adapter: cloudflare({ │
│ platformProxy: { │
│ enabled: true, │
│ }, │
│ }), │
│ integrations: [tailwind(), icon()], │
│ }) │
╰───────────────────────────────────────────────╯
✔ Continue? … yes
success Added the following integration to your project:
- astro-icon
❯ nr dev
$ astro dev
✘ astro v5.0.0-beta.8 is not yet supported in the Community edition of Console Ninja.
We are working hard on it for you https://tinyurl.com/3h9mtwra.
Estimated release dates:
- Community users: around 8th February, 2025 (subject to team availability)
- PRO users: priority access is available now
21:46:08 [WARN] [config] The adapter @astrojs/cloudflare has limited support for "sharp". Certain features may not work as expected.
21:46:08 [types] Generated 2ms
Using vars defined in .dev.vars
Using vars defined in .dev.vars
21:46:09 [vite] Re-optimizing dependencies because lockfile has changed
astro v5.0.0-beta.8 ready in 3258 ms
┃ Local http://localhost:4321/
┃ Network use --host to expose
▶ This is a beta prerelease build!
Report issues here: https://astro.build/issues
21:46:10 watching for file changes...
warn - The `content` option in your Tailwind CSS configuration is missing or empty.
warn - Configure your content sources or your generated CSS will be missing styles.
warn - https://tailwindcss.com/docs/content-configuration
21:46:21 [WARN] [astro-icon] No icons detected!
21:46:21 [200] / 199ms
^C
❯ nr dev
$ astro dev
✘ astro v5.0.0-beta.8 is not yet supported in the Community edition of Console Ninja.
We are working hard on it for you https://tinyurl.com/3h9mtwra.
Estimated release dates:
- Community users: around 8th February, 2025 (subject to team availability)
- PRO users: priority access is available now
21:47:27 [WARN] [config] The adapter @astrojs/cloudflare has limited support for "sharp". Certain features may not work as expected.
21:47:27 [types] Generated 2ms
Using vars defined in .dev.vars
Using vars defined in .dev.vars
astro v5.0.0-beta.8 ready in 2018 ms
┃ Local http://localhost:4321/
┃ Network use --host to expose
▶ This is a beta prerelease build!
Report issues here: https://astro.build/issues
21:47:27 watching for file changes...
Not sure why this was closed but I still get this error when using the cloudflare adapter
This issue was closed because the initial report was an upstream issue, which got fixed. Please open a new issue with minimal reproduction example, if you still see a different issue.
Astro Info
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 )
I have played around and by changing the adapter version to 10 in the packacge it allows to use npm run dev
What's the expected result?
The expected output is to be able to run a development server.
Link to Minimal Reproducible Example
unknown
Participation