Comments (7)
Are you saying that the reproduction doesn't show the issue you found?
from astro.
Massive egg on my face, but yes. I tried to get it to break yesterday but just couldn't. I am however able to do it with the project I'm working on, I can make the repository public so you can poke around if you like.
from astro.
Unless it's relatively small would prefer that you reproduce in the example you provided. It's possible that through reducing you'll find out that it's not a bug at all.
from astro.
I had to poke it a bit, but I reproduced the issue. Turns out, it's not a problem with the build like I thought, it's a problem with astro check
Reproduction steps are load up the codespace, run astro check
, and observe it freak out when the collection's empty
from astro.
astro check
's behaviour is correct here - when the collection is empty the types are unknown
, never
etc so trying to do operations on them results in type errors.
from astro.
astro check
's behaviour is correct here - when the collection is empty the types areunknown
,never
etc so trying to do operations on them results in type errors.
That would make sense if a collection didn't have a schema defined, but since it does the type would be known in theory, I would think
from astro.
@murl-digital Ah interesting, I am able to replicate with your Stackblitz example by running npm run astro check
. Confirmed the issue goes away if at least one entry is present. I agree we should defer to your config types when a directory is empty
from astro.
Related Issues (20)
- Expertimental rewrite: when target page throws an error, this results in "404 Not Found" HOT 6
- Unexpected token '<', "<!doctype "... is not valid JSON HOT 1
- Dev toolbar axe app hidden by popups and hightlights
- Unexpected Token when importing CSS module or CSS file with preact HOT 1
- `getStaticPaths` fails during `astro build` when it imports a module that uses `import.meta.dirname` HOT 2
- Astro renders dom elements outside of its parent if there are buttons within buttons HOT 5
- ViewTransitions reset scroll position after a form submission HOT 1
- Astro + React - Conditional Render HOT 1
- Experimental rewriting of POST request does not work HOT 2
- Container API usage within an Astro project fails to build when using pnpm
- Repo can't be opened on GitHub codespaces HOT 1
- MDX cannot be used with the Container API HOT 1
- View Transitions Breaking AlpineJs `alpine:init` Event HOT 6
- Invalid MIME type in Picture component HOT 2
- Issue with rendering HTML component as a Astro component's child. [email protected] | @astrojs/[email protected] HOT 5
- Assets imported through seed files points to incorrect URL in prod
- [Container API] Unable to pass props to container.renderToString HOT 1
- Astro:db Seed File Fails to be Loaded | "Failed to load url" HOT 2
- Updating to [email protected] throws errors HOT 3
- Astro update check breaks `astro dev` if offline HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from astro.