Solution 1 :

you forgot the comma , between properties of json object

  const colors = {
    background: '#24323f',
    accent: '#2b435a'
  }

Problem :

I can’t figure out what the problem is. I’ve tried commenting out different parts, even commenting out the entire thing but it keeps giving me this error. I made sure to check if my code was supplying the correct template to the render and it was.

<!DOCTYPE html>

<%
  const colors = {
    background: '#24323f'
    accent: '#2b435a'
  }
%>

<html style='background: <%= colors.background %>'>
  <body>
    <div class='insideBox' style='width: 100%; height: 100%; margin: 5%; background: <%= colors.accent %>'>
      <div class='headers' style='margin: 0 auto;'>
        <h2>Account Invitation</h2>
      </div>
    </div>
  </body>
</html>
[api-dev] SyntaxError: Unexpected identifier while compiling ejs
[api-dev]
[api-dev] If the above error is not helpful, you may want to try EJS-Lint:
[api-dev] https://github.com/RyanZim/EJS-Lint
[api-dev] Or, if you meant to create an async function, pass `async: true` as an option.
[api-dev]     at new Function (<anonymous>)
[api-dev]     at Template.compile (C:UsersArthurDocumentsGitHubconference-managernode_modulesejslibejs.js:626:12)
[api-dev]     at Object.compile (C:UsersArthurDocumentsGitHubconference-managernode_modulesejslibejs.js:366:16)
[api-dev]     at handleCache (C:UsersArthurDocumentsGitHubconference-managernode_modulesejslibejs.js:215:18)
[api-dev]     at Object.exports.render (C:UsersArthurDocumentsGitHubconference-managernode_modulesejslibejs.js:393:10)
[api-dev]     at emailUser (C:UsersArthurDocumentsGitHubconference-managersrcserverutilindex.js:311:16)
[api-dev]     at readFile.then (C:UsersArthurDocumentsGitHubconference-managersrcserverutilindex.js:281:27)

By