Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

167
Views
EJS Element not showing up

Hi I am having an issue with my EJS error message. Each time the error is passed through, the error message is supposed to be brought into the page but never does. No errors or anything. I debugged a bit and figured out that the res.render wasn't working.

EJS:

<% if(typeof error != "undefined") { %>
    <%= console.log(error) %>
    <div class="py-8 px-6">
        <div class="p-6 border-l-4 border-orange-600 bg-orange-500 rounded-r-lg">
            <div class="flex items-center">
                <span class="inline-block mr-2">
                    <svg width="24" height="20" viewbox="0 0 24 20" fill="none" xmlns="http://www.w3.org/2000/svg" data-config-id="auto-svg-1-10"></svg>
                </span>
                <h3 class="text-white font-medium" data-config-id="header"><%= error %></h3>
                <button class="ml-auto">
                    <svg class="text-orange-800" width="12" height="12" viewbox="0 0 12 12" fill="none" xmlns="http://www.w3.org/2000/svg" data-config-id="auto-svg-2-10"></svg>
                </button>
            </div>
        </div>
    </div>
<% } %>

My API:

if (plainPassword.length < 6) {
    error = "Password must be 6 or more characters";
    return res.render("signup", { error, username, plainPassword, plainEmail })
}

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!