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: [ERROR] The build was canceled #11390

Closed
simonwinter opened this issue Jul 1, 2024 · 4 comments
Closed

🐛 BUG: [ERROR] The build was canceled #11390

simonwinter opened this issue Jul 1, 2024 · 4 comments
Labels
needs repro Issue needs a reproduction

Comments

@simonwinter
Copy link

Describe the Bug

I've just encountered a similar error with astro 4.11.3 and astro-check 0.7.0 as the closed error withastro/language-tools#757 - namely I would get the following when running astro check:

➜ yarn build
22:55:33 [types] Added src/env.d.ts type declarations.
✘ [ERROR] The build was canceled

22:55:33 [types] Added src/env.d.ts type declarations.
22:55:33 Types generated 361ms
22:55:33 [check] Getting diagnostics for Astro files in /Users/simon/astro-website...
Result (2 files):
- 0 errors
- 0 warnings
- 0 hints

Note: for brevity, I've changed the build command to simply astro check, not astro check && astro build

Solution?

After much digging, I found that I had an empty content directory (i.e. a directory with no files inside). Removing it and running the command again solved this issue.

Steps to Reproduce

Using yarn berry (4.3.1):

  1. yarn install
  2. yarn build
  3. Error! The build says it's canceled, but carries on regardless.
@github-actions github-actions bot added the needs triage Issue needs to be triaged label Jul 1, 2024
@Princesseuh
Copy link
Member

Princesseuh commented Jul 1, 2024

This is unrelated to astro check itself (the code that is in this repo), it's the internal call to astro sync that causes this.

@Princesseuh Princesseuh transferred this issue from withastro/language-tools Jul 1, 2024
@ematipico ematipico added - P3: minor bug An edge case that only affects very specific usage (priority) feat: env related to the way astro handles `.env` or `import.meta.env` or `process.env` (scope) needs repro Issue needs a reproduction and removed needs triage Issue needs to be triaged - P3: minor bug An edge case that only affects very specific usage (priority) feat: env related to the way astro handles `.env` or `import.meta.env` or `process.env` (scope) labels Jul 1, 2024
@ematipico
Copy link
Member

@simonwinter could you please create a reproduction for us?

Copy link
Contributor

github-actions bot commented Jul 1, 2024

Hello @simonwinter. Please provide a minimal reproduction using a GitHub repository or StackBlitz. Issues marked with needs repro will be closed if they have no activity within 3 days.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Jul 5, 2024
@merlinschumacher
Copy link

merlinschumacher commented Oct 18, 2024

I have the issue as well when running astro sync. The error disappears, when you clear out the content directory.

The fix in my case was to move the config.ts from the src to the proper content directory.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs repro Issue needs a reproduction
Projects
None yet
Development

No branches or pull requests

4 participants