-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Empty content collections with programmatic API since 5.0.3 #12652
Comments
Ran into this as well. |
NODE_ENV can be testing during dev. A quick fix would be to be explicit here as well (similar to the changes to
A better fix would be derive astro/packages/astro/src/core/create-vite.ts Lines 89 to 92 in f13417b
|
* test with latest versions * adjust test: adds-to-head * adjust test: dynamic-import * fix script command * adjust tests: prerender-patterns * adjust tests: scope * fix(typed-api): declaration file generation * update test script for emotion * update dependencies * update dev dependency to avoid type error * astro 5 replaces hybrid option with static * new fields in APIContext * updated lockfile * remain on typescript 5.6 * fix getting scope from compiler * adjust test: adds-to-head * workaround for astro bug * remove console.log * fix(emotion): css on server components since vite 6 * chore(global): directly augment types * fix(scope): use final astro config for the compiler * chore(scope): directly augment types * chore(dynamic import): directly augment types * chore(emotion): directly augment types * chore(typed-api): rework type generation * update astro to 5.0.3 * switch workaround for withastro/astro#12612 with workaround for withastro/astro#12652 * feat(emotion): caching * chore(client-interaction): minor bump * chore(dynamic-import): major bump * chore(typed-api): minor bump * chore(astro-emotion): major bump * chore(astro-global): major bump * chore(astro-scope): major bump * update lockfile * remove console.log
Noting that @ascorbic hoped this might be a duplicate of #12866 and fixed in 5.1.4, but it unfortunately doesn’t seem to be the case. Starlight end-to-end tests which are impacted by this issue are still failing in withastro/starlight#2736 after to updating to 5.1.4 |
Astro Info
If this issue only occurs in one browser, which browser is a problem?
No response
Describe the Bug
Spotted in a similar scenario in an E2E test in the Starlight repo, it looks like using the Astro programmatic API to build a project using content collections, serving it and then starting a dev server leads to different results:
In the linked repro, the following script is immediately run:
The preview panel will work as expected as it's showing the production version built first and served on the port
4321
.Manually changing the URL to switch to the dev server (there is a
4321
in the URL that can be changed to4322
) will show a 404 error and log the mentioned error.Note that this works fine when using Astro v5.0.2, maybe related to #12640 but only a guess.
What's the expected result?
The expected result is the same behavior in both cases.
Link to Minimal Reproducible Example
https://stackblitz.com/edit/github-gaqwbs?file=repro.js&on=stackblitz
Participation
The text was updated successfully, but these errors were encountered: