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

🐛 BUG: npm create cloudflare (C3) fails with astro framework - error adding type declarations to src/env.d.ts #7416

Closed
jldec opened this issue Dec 3, 2024 · 2 comments · Fixed by #7497
Labels
bug Something that isn't working

Comments

@jldec
Copy link

jldec commented Dec 3, 2024

Which Cloudflare product(s) does this pertain to?

C3 (npm create cloudflare)

What version(s) of the tool(s) are you using?

c3 v2.33.1, [email protected]

What version of Node are you using?

22.11.0

What operating system and version are you using?

macOS Sequoia v15.1.1

Describe the Bug

Observed behavior

c3 exits with a fatal error when it tries to add type declarations in src/env.d.ts
This file appear to have been removed (made optional).

Screenshot 2024-12-03 at 00 06 06

Expected behavior

c3 should not error out with astro projects.

Steps to reproduce

  • npm create cloudflare (with or without --experimental, both fail in the same way)
  • select "Framework Starter", and then "Astro"
  • select "Include sample files" (or "Blog" or "Empty")
  • select "Yes" for TypeScript (the default)

Please provide a link to a minimal reproduction

No response

Please provide any relevant error logs

Updating configuration in astro.config.mjs
Adding type declarations in src/env.d.ts
ERROR  Error: Error parsing file: src/env.d.ts
@alexanderniebuhr
Copy link
Contributor

alexanderniebuhr commented Dec 7, 2024

We changed the way types are declared in Astro v5: https://docs.astro.build/en/guides/upgrade-to/v5/#changed-typescript-configuration

@dario-piotrowicz
Copy link
Member

Thanks for the issue @jldec 🙂

#7497 should address this 👍

@penalosa penalosa moved this from Untriaged to In Progress in workers-sdk Dec 16, 2024
@github-project-automation github-project-automation bot moved this from In Progress to Done in workers-sdk Dec 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something that isn't working
Projects
None yet
3 participants