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

Build cancelled when running pnpm astro sync #12138

Closed
1 task
Serpentarius13 opened this issue Oct 6, 2024 · 6 comments
Closed
1 task

Build cancelled when running pnpm astro sync #12138

Serpentarius13 opened this issue Oct 6, 2024 · 6 comments
Labels
- P2: nice to have Not breaking anything but nice to have (priority)

Comments

@Serpentarius13
Copy link

Serpentarius13 commented Oct 6, 2024

Astro Info

Astro                    v4.15.11
Node                     v20.16.0
System                   Linux (x64)
Package Manager          pnpm
Output                   static
Adapter                  none
Integrations             @astrojs/mdx

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

No response

Describe the Bug

When running pnpm astro sync to sync up content collections, it outputs this:
image

And types for data property on collections are not generated (any). Also, when removing content folder, it works just fine

What's the expected result?

Generate typings

Link to Minimal Reproducible Example

https://github.com/Serpentarius13/astro-build-cancelled-repro

Participation

  • I am willing to submit a pull request for this issue.
@github-actions github-actions bot added the needs triage Issue needs to be triaged label Oct 6, 2024
@Serpentarius13
Copy link
Author

It seems I just didn't add config.ts there =) Baka

@Serpentarius13 Serpentarius13 reopened this Oct 6, 2024
@Serpentarius13
Copy link
Author

Serpentarius13 commented Oct 6, 2024

Actually, I think it would be much better if the error was more specific, this way it would be much more reasonable to see that at certain point CLI didn't find something it needed. Of course, if you follow documentation, you will probably get what you need, but those types of issues highlight that it is possible to get completely lost when trying to debug your error. Maybe move to feature request?

@florian-lefebvre
Copy link
Member

Yeah even though there's this log, it doesn't actually break anything. It would be nice to understand why it shows tho

@florian-lefebvre florian-lefebvre added - P2: nice to have Not breaking anything but nice to have (priority) and removed needs triage Issue needs to be triaged labels Oct 7, 2024
@ascorbic
Copy link
Contributor

ascorbic commented Oct 7, 2024

This was fixed in #11976, so will be in the next beta release

@ascorbic ascorbic closed this as completed Oct 7, 2024
@Serpentarius13
Copy link
Author

Serpentarius13 commented Oct 7, 2024

Yeah even though there's this log, it doesn't actually break anything. It would be nice to understand why it shows tho

The log was because I used index.ts file instead of config.ts in src/content directory. I spent an hour or two scrambling at dist source code to console.log the issue down and found out that it couldn't find my file. I think errors could be about what happened, and not that the "build was cancelled"? On every check where there's something missing and would proceed further (return void 0), wouldn't it be cool to add some logger.error("This thing not found")?

@florian-lefebvre
Copy link
Member

florian-lefebvre commented Oct 7, 2024

As Matt said, it should be fixed (and such case covered) in the last beta

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
- P2: nice to have Not breaking anything but nice to have (priority)
Projects
None yet
Development

No branches or pull requests

3 participants