Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8570507
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T18:34:27+00:00 2026-06-11T18:34:27+00:00

In expressjs, Dustjs Multiple templates not working getting 500 Error: Template Not Found: template

  • 0

In expressjs, Dustjs Multiple templates not working getting 500 Error: Template Not Found: template

my base dust template as below (template.dust)

<div class="page">
  {+pageHeader}Hello World!{/pageHeader}
  <div class="bodyContent">
    {+bodyContent/}
  </div>
  <div class="footer">
    {+pageFooter}
       <hr>
       <a href="/contactUs">Contact Us</a>
    {/pageFooter}
  </div>
</div>

And I am trying to call this base template inside my home.dust I am getting error as below

Express
500 Error: Template Not Found: template
at Object.load (C:\office\nodejs-example\express_example\node_modules\application-name\node_modules\dust\lib\dust.js:54:27)
at Chunk.partial (C:\office\nodejs-example\express_example\node_modules\application-name\node_modules\dust\lib\dust.js:407:15)
at body_0 (undefined:1:130)
at Array.0 (C:\office\nodejs-example\express_example\node_modules\application-name\node_modules\dust\lib\dust.js:34:7)
at EventEmitter._tickCallback (node.js:192:40)

“home.dust”

{>"template"/}
{<pageHeader}
   {?username}
     Welcome {username} <a href="/items">Items</a> | <a href='/logout'> Log Out</a>
      {:else}
         <form method="POST" action="/signin">
            <label>Usename <input type="text" name="username" id="s-user"></label>
            <input type="submit" class="submit" value="Login">
         </form>
      {/username}
{/pageHeader}

routes class method

exports.home = function(req, res){
    res.render('home', {username :  req.session.username});

};
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T18:34:28+00:00Added an answer on June 11, 2026 at 6:34 pm

    Use dustjs-linkedin package with consolidate package (dustjs package is no longer maintained). Both are on npm. You can use dust templates with a layout by doing the following:

    layout.dust

      <body>
        <h1>{title}</h1>
    {+content}
    This is the base content.
    {/content}
      </body>
    

    index.dust (homepage partial)

    {>"views/layout.dust"/}
    {<content}
    This is loaded from a partial.
    {/content}
    

    app.js

    var dust = require('dustjs-linkedin')
    , cons = require('consolidate');
    
    app.engine('dust', cons.dust);
    

    Full Example: https://github.com/chovy/express-template-demo

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using ExpressJS with normal HTML templates (no Jade or similar template engines). Since
I have an expressjs app with everyauth setup. Everyauth is working fine. Now, I
I'm implementing my own template engine for expressjs in node.js and, per the documentation
I was exploring developing in Node.JS and found ExpressJS and RailwayJS (based on Express)
I am currently working on a project with 3 friends using nodeJs, expressJs, MongoDB,
I'm using jade/pug template engine with ExpressJS on Node.js. It outputs a html with
Currenty I am trying to add an error & notice function to my expressjs
I use expressjs with node-mysql module. I got this error when I post to
Working with expressjs for about a month by now I have stumbled across the
I'm running an Expressjs installation on heroku, and it's not loading the stylesheets. I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.