Unexpected Token in Handle Submit

This tutorial is just what I need, but not integrating well with my Node 9.x > Express > React app … I am somewhat new to this level of error.

client:47 ./src/components/Login.js
Module build failed: SyntaxError: C:/Users/Baconinja/Documents/_aws/_sites/bw-admin-v2/client/src/components/Login.js: Unexpected token (27:23)
  25 |   }
  26 | 
> 27 |   handleSubmit = async event => {
     |                        ^
  28 |     event.preventDefault();

Hmm it looks like it is complaining about the ES syntax. Are you not using Create React App? If so, then you might need to look into the Babel preset necessary to enable this syntax.

Thanks! I did end up rebuilding the auth from a new Create React App instance and it seems fine now. Not sure what step I missed, but I appreciate the reply!

1 Like