Code Monkey home page Code Monkey logo

Comments (7)

matthewp avatar matthewp commented on June 2, 2024

Are you saying that the reproduction doesn't show the issue you found?

from astro.

murl-digital avatar murl-digital commented on June 2, 2024

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.

matthewp avatar matthewp commented on June 2, 2024

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.

murl-digital avatar murl-digital commented on June 2, 2024

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.

Princesseuh avatar Princesseuh commented on June 2, 2024

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.

murl-digital avatar murl-digital commented on June 2, 2024

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.

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.

bholmesdev avatar bholmesdev commented on June 2, 2024

@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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.