Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unhandled Rejection #6

Closed
medevs opened this issue Apr 14, 2020 · 3 comments
Closed

Unhandled Rejection #6

medevs opened this issue Apr 14, 2020 · 3 comments

Comments

@medevs
Copy link

medevs commented Apr 14, 2020

×
Unhandled Rejection (TypeError): Cannot read property 'error' of undefined
(anonymous function)
./components/auth/SignupComponent.js:24
21 | const user = { name, email, password };
22 |
23 | signup(user).then(data => {

24 | if (data.error) {
| ^ 25 | setValues({ ...values, error: data.error, loading: false });
26 | } else {
27 | setValues({

@medevs medevs closed this as completed Apr 17, 2020
@Rach523
Copy link

Rach523 commented Apr 23, 2020

I am getting the same error. How did you resolve this?

@medevs
Copy link
Author

medevs commented Apr 24, 2020

go to config.js and replace API

export const API = publicRuntimeConfig.PRODUCTION
? publicRuntimeConfig.API_PRODUCTION
: 'http://localhost:8000/api';

export const APP_NAME = publicRuntimeConfig.APP_NAME;

export const DOMAIN = publicRuntimeConfig.PRODUCTION
? publicRuntimeConfig.DOMAIN_PRODUCTION
: 'http://localhost:8000/';

environment variable doesn't work for some reason so you have to replace the variables with the actual value.

@Rach523
Copy link

Rach523 commented Apr 25, 2020

thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants