Comments (7)
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.
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.
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.
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.
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.
It seems to be fine now, @brainthinks , the requirement on the necessary types is already there:
v18 | v17 |
---|---|
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.
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)
- Specifying input headers HOT 8
- TypeScript errors TS4023, TS4094 HOT 11
- Multiple servers in Swagger HOT 2
- Export request/response types from generated client HOT 5
- Listening to a configurable hostname HOT 1
- Insufficient types export (TS4023) of `Metadata` HOT 1
- Task: fix NPM warning during publishing
- Cannot create multiple errors response when generate Document
- Set schema name using withMeta
- Type regression from 16.1.0 to 16.2.0 HOT 3
- incorrect pattern field for openapi HOT 4
- What tool did you use to make the handdrawn diagram?
- OpenApi yaml spec has wrong minimum value for doubles HOT 6
- Allow all express-fileupload configurations HOT 5
- winston detetction not sufficient HOT 10
- Is it possible to add custom documentation generation for my custom zod types HOT 2
- Duplicated headers in request body in generated docs (POST, PATCH, etc.) HOT 10
- Customising logger with winston erroring out in v19 HOT 17
- Default number range for `z.number()` causes `openapi-generator-cli generate` to fail HOT 1
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 express-zod-api.