TryGhost / express-hbs

Express handlebars template engine with inheritance, partials, i18n and async helpers.
MIT License
458 stars 76 forks source link

Failed to lookup view #242

Closed HosMercury closed 2 years ago

HosMercury commented 2 years ago

I have this err Error: Failed to lookup view "/admin/dashboard" in views directory "/Users/h/work/kora/views"


`var hbs = require('express-hbs');
require('./src/views/helpers/hbs_date_helper')(hbs);

app.engine(
  'hbs',
  hbs.express4({
    partialsDir: __dirname + '/src/views/partials'
  })
);
app.set('view engine', 'hbs');
app.set('views', __dirname + '/src/views');

app.use(express.static(__dirname + '/src/public'));`

knowing that the views directory is in the src dir ...and it refuses to look inside src Screen Shot 2021-09-27 at 4 46 27 PM