Closed
Description
Pretty simple express
+ nunjucks
setup, code is:
app.get('/', (req, res) => {
res.render(`views/index.html`, {
title: 'Index.html',
items: [
{name: 'item 1'},
{name: 'item 2'},
{name: 'item 3'}
]
});
});
Error: template not found: err.nunjucks
at createTemplate (my_proj/node_modules/nunjucks/src/environment.js:274:15)
at next (my_proj/node_modules/nunjucks/src/lib.js:283:7)
at handle (my_proj/node_modules/nunjucks/src/environment.js:313:11)
at my_proj/node_modules/nunjucks/src/environment.js:323:9
at next (my_proj/node_modules/nunjucks/src/lib.js:281:7)
at Object.asyncIter (my_proj/node_modules/nunjucks/src/lib.js:287:3)
at Environment.getTemplate (my_proj/node_modules/nunjucks/src/environment.js:305:9)
at Environment.render (my_proj/node_modules/nunjucks/src/environment.js:344:10)
at NunjucksView.render (my_proj/node_modules/nunjucks/src/express-app.js:20:9)
at tryRender (my_proj/node_modules/express/lib/application.js:640:10)
File is there. was sent as a static html file before adding nunjucks
to the project. The error is pretty cryptic, should it tell me what template it isn't finding?
Metadata
Metadata
Assignees
Labels
No labels