@@ -58,7 +58,8 @@ Start your API server with I/O schema validation and custom middlewares in minut
5858 5 . [ Graceful shutdown] ( #graceful-shutdown )
5959 6 . [ Subscriptions] ( #subscriptions )
60608 . [ Caveats] ( #caveats )
61- 1 . [ Excessive properties in endpoint output] ( #excessive-properties-in-endpoint-output )
61+ 1 . [ Zod 4 schema assignment error] ( #zod-4-schema-assignment-error )
62+ 2 . [ Excessive properties in endpoint output] ( #excessive-properties-in-endpoint-output )
62639 . [ Your input to my output] ( #your-input-to-my-output )
6364
6465See also [ Changelog] ( CHANGELOG.md ) and [ automated migration] ( https://www.npmjs.com/package/@express-zod-api/migration ) .
@@ -84,6 +85,8 @@ Therefore, many basic tasks can be accomplished faster and easier, in particular
8485
8586These people contributed to the improvement of the framework by reporting bugs, making changes and suggesting ideas:
8687
88+ [ <img src =" https://github.com/MichaelHindley.png " alt =" @MichaelHindley " width =" 50px " />] ( https://github.com/MichaelHindley )
89+ [ <img src =" https://github.com/zoton2.png " alt =" @zoton2 " width =" 50px " />] ( https://github.com/zoton2 )
8790[ <img src =" https://github.com/ThomasKientz.png " alt =" @ThomasKientz " width =" 50px " />] ( https://github.com/ThomasKientz )
8891[ <img src =" https://github.com/james10424.png " alt =" @james10424 " width =" 50px " />] ( https://github.com/james10424 )
8992[ <img src =" https://github.com/HeikoOsigus.png " alt =" @HeikoOsigus " width =" 50px " />] ( https://github.com/HeikoOsigus )
@@ -174,7 +177,11 @@ pnpm add express-zod-api express zod typescript http-errors
174177pnpm add -D @types/express @types/node @types/http-errors
175178```
176179
177- Ensure having the following options in your ` tsconfig.json ` file in order to make it work as expected:
180+ ## Environment preparation
181+
182+ Consider using the recommended ` tsconfig.json ` base for your project according to your Node.js version,
183+ for example [ the base for Node.js 20+] ( https://github.com/tsconfig/bases/blob/main/bases/node20.json ) .
184+ Ensure having the following options in order to make it work as expected:
178185
179186``` json
180187{
@@ -185,6 +192,8 @@ Ensure having the following options in your `tsconfig.json` file in order to mak
185192}
186193```
187194
195+ See also how ` moduleResolution ` may cause [ Zod 4 schema assignment error] ( #zod-4-schema-assignment-error ) .
196+
188197## Set up config
189198
190199Create a minimal configuration. Find out all configurable options
@@ -1376,6 +1385,18 @@ framework, [Zod Sockets](https://github.com/RobinTail/zod-sockets), which has si
13761385There are some well-known issues and limitations, or third party bugs that cannot be fixed in the usual way, but you
13771386should be aware of them.
13781387
1388+ ## Zod 4 schema assignment error
1389+
1390+ When using ` zod@^4 ` and doing ` import { z } from "zod" ` you may encounter the following error:
1391+
1392+ ``` text
1393+ TS2739: ZodObject<...> is missing the following properties from ZodType<...>: example, deprecated.
1394+ ```
1395+
1396+ In this case make sure the ` moduleResolution ` in your ` tsconfig.json ` is either ` node16 ` , ` nodenext ` or ` bundler ` .
1397+ Consider the [ recommended tsconfig base, Node 20+] ( https://github.com/tsconfig/bases/blob/main/bases/node20.json ) .
1398+ Otherwise, keep importing ` from "zod/v4" ` or consider upgrading the framework to v25.
1399+
13791400## Excessive properties in endpoint output
13801401
13811402The schema validator removes excessive properties by default. However, Typescript
0 commit comments