Express error: Failed to lookup view “error” in views directory processing

Express framework installs EJS templates by modifying them in app.js

app.set('views', path.join(__dirname, 'views/'));
app.engine('.html', require('ejs').renderFile);
app.set('view engine', 'html');

template for ejs, suffix to HTML after individual pages open tip Failed to lookup the view “error” in views directory error, found behind the template in a parameter is not passed so there is an error, but because the views directory under the lack of the error file resulting in this error, the solution is below the template directory to create a error file is used to output error information.

Read More: