hidjou / classsed-graphql-mern-apollo

408 stars 255 forks source link

TypeError: Cannot convert undefined or null to object #45

Open TausifM opened 2 years ago

TausifM commented 2 years ago

this error of login and register page of errors.username errors.password are undefined <Form.Input label="Username" placeholder="Username.." name="username" type="text" value={values.username} error={errors.username ? true : false} onChange={onChange} />

gitbit-hash commented 2 years ago

I had the same issue, you need to provide SECRET_KEY: "your secret key" in the config file in the server-side files

meganlynn21 commented 2 years ago

I am getting the same error too. It is not the secret key though for me. Has anyone figured out this?

chopsqd commented 1 year ago

Hi there! Had the same error. Use 'setErrors(error.graphQLErrors[0].extensions.errors)' instead of 'setErrors(error.graphQLErrors[0].extensions.exception.errors)' helped to me. Hope that will help!