[BUG] TypeError: keyValidator._parse is not a function
See original GitHub issueusing separate zod schema doen’t work
🚀 ~ action ~ error TypeError: keyValidator._parse is not a function
at ZodObject._parse (types.js:1188:37)
at ZodObject._parseSync (types.js:109:29)
at ZodObject.safeParse (types.js:139:29)
at ZodObject.parse (types.js:120:29)
at Object.parseForm (index.js:50:22)
at async action (main.tsx:25:20)
at async callLoaderOrAction (router.ts:2530:14)
at async handleAction (router.ts:981:16)
at async startNavigation (router.ts:904:26)
at async Object.navigate (router.ts:784:12)
here the repo for reproduce: zodix-rr-reproduce
Issue Analytics
- State:
- Created a year ago
- Reactions:2
- Comments:5 (2 by maintainers)
Top Results From Across the Web
TypeError: parse is not a function - node.js - Stack Overflow
I've checked my package.json file and have my start scripts assigned correctly. I have been at it with this error for nearly a...
Read more >parse is not a function · Issue #155 · apollographql/graphql-tag
I'am getting error at query declaration. index.js:128 Uncaught TypeError: parse is not a function Debugging, I realized the method parse at ...
Read more >How to fix this error? - Node - Code with Mosh Forum
TypeError : parse is not a function at Object. (C:\Users\pravi\Desktop\node\planets-project\index.js:8:11) ←[90m at Module.
Read more >csv-parse - npm
CSV parser for Node.js and the web. Build Status NPM. The csv-parse package is a parser converting CSV text input into arrays or...
Read more >Express body-parser middleware
If not a function, type option is passed directly to the type-is library and this can be an extension ... The parsing can...
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
That makes sense because the dependency resolution would be less error prone that way.
Regardless, I just tested your repro with the
v0.3.0
release and it’s working now.I’m running into this issue in my project. Removing the following check seems to fix it
We’re using esbuild so it could be because of that. I haven’t dug in too deep but without esbuild it seems to work. It would be good to have a fix.
Edit: A suitable workaround (or maybe actually the intended way to use this library) is to pass a zod schema instead of a zod object.
eg from the docs
instead of