question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

undefined is not an object (evaluating '_yup2.default.object') in v 0.25

See original GitHub issue

Hi guys, when update to v 0.25.0 im getting the following error:

simulator screen shot - iphone x - 2018-05-28 at 17 13 15

Here the code:

import Yup from 'yup';
// ...
validationSchema={Yup.object().shape({
  username: Yup.string().required(I18n.t('user_required')),
  password: Yup.string().required(I18n.t('password_required')),
})} 

What it means? in v 0.24 works as expected, thanks !!!

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

17reactions
luanwscommented, Sep 23, 2020

Change the import from import Yup from 'yup'; to import * as Yup from 'yup';

0reactions
radoncreepcommented, Jan 19, 2021

thanks @luanws

Read more comments on GitHub >

github_iconTop Results From Across the Web

reactjs - How to solve this error -> undefined is not an object ...
Seems like your firebase app never initialize as haven't constructed the Firebase object. As you're using expo you can simply follow this ...
Read more >
receiving [TypeError: undefined is not an object (evaluating ...
I have a user input screen (AddTrack.js), in which I'm using the useState hook to capture input values. Have been trying to use...
Read more >
undefined is not an object (evaluating 'layout.levels[intersect[0 ...
I am generating a diagram programmatically and now getting this quite often: TypeError: undefined is not an object (evaluating ...
Read more >
Add default values to variables destructured from a JavaScript ...
... default values to variables destructured from a JavaScript object, ... undefined because a certain field is not specified in the object ......
Read more >
undefined is not an object (evaluating 'navigation.state') - Reddit
I'm getting "TypeError: undefined is not an object (evaluating 'navigation.state')" when I click on Logout tab button, look at
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found