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

143
Views
EJS does not see an existing view

Error: Failed to lookup view "home" in views directory

Why the app can't see the view called home? The same folder that contains app.js file contains a folder called "views" with file home.ejs. Here is the app.js file:

// jshint esversion:6
const express = require(`express`);
const ejs = require(`ejs`);
const app = express();

app.set(`view engine`, `ejs`);

app.use(express.static(`public`));

app.get(`/`, function(req, res) {
  res.render(`home`);
});

app.get(`/login`, function(req, res) {
  res.render(`login`);
});

app.get(`/register`, function(req, res) {
  res.render(`register`);
});

let port = process.env.PORT;
if(port == null || port == ``) {
  port = 3000;
}

app.listen(port, function() {
  console.log(`The server is now on.`);
});
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!