Zod 3.10.x is broken on node 12
See original GitHub issueRepro:
$ docker run -ti --rm --entrypoint sh node:12-slim -c "npm i zod@3.10.1 && node -e \"require('zod').number().parse('5')\""
...
/node_modules/zod/lib/types.js:82
path: params?.path || [],
^
SyntaxError: Unexpected token '.'
at wrapSafe (internal/modules/cjs/loader.js:915:16)
at Module._compile (internal/modules/cjs/loader.js:963:27)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
at Module.load (internal/modules/cjs/loader.js:863:32)
Issue Analytics
- State:
- Created 2 years ago
- Reactions:3
- Comments:5 (1 by maintainers)
Top Results From Across the Web
Announcing the end of support for Node.js 12.x in ...
Starting November 1, 2022, AWS SDK For JavaScript (v3) will no longer support Node.js 12.x which was EOL on April 30, 2022. We...
Read more >How do I fix this zod error I am getting while deploying ...
I believe to have found where the error is in my code, I just don't know how to fix it. It is the...
Read more >Node v12.22.12 (LTS)
Node.js® is a JavaScript runtime built on Chrome's V8 JavaScript engine.
Read more >Build a REST API with Node.js, Express, TypeScript ...
js, Express, TypeScript, MongoDB & Zod.
Read more >All Actions will begin running on Node16 instead of Node12
Node 12 has been out of support since April 2022, as a result we have started the deprecation process of Node 12 for...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Sorry, the TypeScript compilation target got set to
"es2020"
by accident. Fixed in zod@3.10.3.Null coalescing isn’t supported in Node 12. I think changing this library target to ES2019 inside tsconfig should fix the issue.