Giter Club home page Giter Club logo

Comments (7)

brainthinks avatar brainthinks commented on July 28, 2024 1

I closed the PR with a comment. I think you're right that this should be a recommended tsconfig setting, and there's no need to document the installation of the existing types.

Thank you!

from express-zod-api.

brainthinks avatar brainthinks commented on July 28, 2024

In order to unblock myself, I ran the following:

yarn add -D @types/compression @types/express-fileupload @types/winston

I may have missed something, and installing these types may not be the desired fix, but it's at least letting me progress.

from express-zod-api.

RobinTail avatar RobinTail commented on July 28, 2024

@brainthinks ,

Your dev environment tries to compile/validate node_modules.
Please ensure having the following option in your tsconfig.json:

{
  "compilerOptions": {
    "skipLibCheck": true,
  }
}

Or consider extending from a recommended base:
https://github.com/tsconfig/bases

Please let me know if this worked.

from express-zod-api.

RobinTail avatar RobinTail commented on July 28, 2024

Managed to reproduce the issue.
Not a bug, but rather lack of Typescript configuration.
I will mention it in the documentation.

from express-zod-api.

brainthinks avatar brainthinks commented on July 28, 2024

Wow, thank you for the immediate response and update! I had planned to offer a PR to you today, but you beat me to it.

Regarding the need to include the skipLibCheck configuration, this will indeed "fix" the issue and unblock newcomers like myself. I think it's worth noting though that I haven't needed to do this for any other dependency (yet). I do think that asking people to set it is a reasonable approach, even more so since this is the way it is configured in the recommended base. In my opinion, a small section in the README for installing the necessary deps to not need to skip lib checks would be helpful, but I can also understand leaving that out as an exercise to the readers (like myself) who want the ability to configure their project in a way that differs from what you recommend. If you agree that mentioning the installation of the types as an alternative is desirable, I'm happy to submit a PR for it.

Either way, thanks!

from express-zod-api.

RobinTail avatar RobinTail commented on July 28, 2024

It seems to be fine now, @brainthinks , the requirement on the necessary types is already there:

v18 v17
2024-04-22_23-08-01 image

The ones that you had to install to unblock yourself

yarn add -D @types/compression @types/express-fileupload @types/winston

Are not necessary when skipLibCheck is enabled, because winston, compression and express-fileupload are optional peer dependencies.

But in case I didn't understand something, feel free to make a PR.

from express-zod-api.

brainthinks avatar brainthinks commented on July 28, 2024

Submitted - #1696

This is what I would have liked to see in the getting started section, for compatibility with the way I/we set up projects. I understand that this may not align with your vision, and adds slight overhead / maintenance burden.

Thanks for taking the time to look at this.

from express-zod-api.

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.