title: Why is my partial not being found?
body: <p>I'm currently making a nodejs app and i'm having some trouble setting it up. I'm using Webstorm's project creator and selecting nodejs express app with handlebars as the engine. I'm also including express-handlebars. For some reason when I include a partial, it doesn't find it even though I specify what the partial folder is. Below is my setup:</p>
  
  <p>App.js</p>
  
  <pre><code>var express = require('express');
  var path = require('path');
  var favicon = require('serve-favicon');
  var logger = require('morgan');
  var cookieParser = require('cookie-parser');
  var bodyParser = require('body-parser');
  
  
  // view engine setup
  var handlebars = require('express-handlebars').create({
    layoutsDir: path.join(__dirname, "views/layouts"),
    partialsDir: path.join(__dirname, "views/partials"),
    defaultLayout: 'layout',
    extname: 'hbs'
  });
  
  
  //routes
  var index = require('./routes/index');
  var users = require('./routes/users');
  var products = require('./routes/products')
  
  var app = express();
  
  
  
  app.engine('handlebars', handlebars.engine);
  app.set('view engine', 'hbs');
  app.set('views', path.join(__dirname, "views"));
  
  app.use(logger('dev'));
  app.use(bodyParser.json());
  app.use(bodyParser.urlencoded({ extended: false }));
  app.use(cookieParser());
  app.use(express.static(path.join(__dirname, 'public')));
  
  
  
  app.use('/', index);
  app.use('/products', products);
  app.use('/users', users);
  
  // catch 404 and forward to error handler
  app.use(function(req, res, next) {
    var err = new Error('Not Found');
    err.status = 404;
    next(err);
  });
  
  // error handlers
  
  // development error handler
  // will print stacktrace
  if (app.get('env') === 'development') {
    app.use(function(err, req, res, next) {
      res.status(err.status || 500);
      res.render('error', {
        message: err.message,
        error: err
      });
    });
  }
  
  // production error handler
  // no stacktraces leaked to user
  app.use(function(err, req, res, next) {
    res.status(err.status || 500);
    res.render('error', {
      message: err.message,
      error: {}
    });
  });
  
  
  module.exports = app;
  </code></pre>
  
  <p>This is my folder structure and my products.js route file as well as my handlebars view. When I navigate to the products page I get an error that says "partial productsinfo not found". I've tried everything and idk how to fix, would appreciate if someone could shed some light on what I'm doing wrong here. Just wanna fix this setup so I can finally start my side project. Thanks!</p>
  
  <p>edit: ignore the .handlebars extension for the productinfo.handlebars partial, i changed the extension to try to get it to work but it did nothing. Now its back to productinfo.hbs and still not working.</p>
  
  <p><a href="https://i.stack.imgur.com/9ADYX.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/9ADYX.png" alt=""></a></p>