TypeError: field.resolve is not a function
See original GitHub issue🐛 Bug report
Current Behavior
it was working fine yesterday, but today it stopped working \o/
it is throwing this error;
Uncaught (in promise) TypeError: field.resolve is not a function
at eval (object.js?0109:159)
at eval (transform.js?50ca:60)
at arrayEach (_arrayEach.js?8057:15)
at transform (transform.js?50ca:59)
at ObjectSchema._cast (object.js?0109:147)
at ObjectSchema._validate (mixed.js?b64f:261)
at ObjectSchema._validate (object.js?0109:187)
at ObjectSchema.validate (mixed.js?b64f:303)
at validateYupSchema (formik.esm.js?2983:519)
at eval (formik.esm.js?2983:175)
Expected behavior
it should not thrown an error
Reproducible example
Your environment
| Software | Version(s) |
|---|---|
| Formik | 1.0.3 and 1.3.1 (tested on both) |
| React | 16.4.1 |
| TypeScript | using pure js |
| Browser | chrome |
| npm/Yarn | yarn |
| Operating System | mac os |
Issue Analytics
- State:
- Created 5 years ago
- Reactions:5
- Comments:5
Top Results From Across the Web
React yup validation leads to promise error field.resolve is not ...
I get the error field.resolve is not a function . This is the snippet of code inside the onClick function: const registrationSchema =...
Read more >TypeError: "x" is not a function - JavaScript - MDN Web Docs
The JavaScript exception "is not a function" occurs when there was an attempt to call a value from a function, but the value...
Read more >React, how to fix the TypeError: resolver is not a function error
React, how to fix the TypeError: resolver is not a function error. Published in 2021. Psssst! The 2023 WEB DEVELOPMENT BOOTCAMP is starting...
Read more >How to resolve the TypeError n(…).valid is not a function | jQuery
“TypeError: n(…).valid is not a function” script error is raised, if the jQuery validation script is not referred in your application.
Read more >How to Fix “Promise resolver undefined is not a function” in ...
The promise executor is a function accepting two other functions: resolve and reject . If you're running into the “Promise resolver ...
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 Free
Top 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
I spent a few minutes trying to solve this issue just to find out that I forgot the method call:
wrong:
correct:
I had this same problem while using nested forms … I later realized that with nested forms every level on nesting should be wrapped in yup.object … I did that and it worked for me … hope this helps 😃