Parsing error: Unexpected token {

So I was using nodemailer and I got a syntax error

const transporter = nodemailer.createTransport({
  service: "hotmail",
 **auth** {
  user: "",
  pass: process.env.Password,

Just add a { at the top

Look how different this line is from the other key-value pairs. Tell us about why this one is so different.

1 Like

That’s where the error is

check up on your basic javascript skills. javascript objects look like this:
key : value,
key2 : value2