When I cloned the original code, I found an error that exphbs is not a function. I rewrite the code with require("express-handlebars").engine({parameters}) which solved the issue. For a better scenario, I am putting the latest versions of npm packages. Your old version was right but as per express-handlebars documentation, I think you need to change the code.
When I cloned the original code, I found an error that exphbs is not a function. I rewrite the code with
require("express-handlebars").engine({parameters})
which solved the issue. For a better scenario, I am putting the latest versions of npm packages. Your old version was right but as per express-handlebars documentation, I think you need to change the code.