我已经对我的应用程序进行了很多更改,以至于我认为与胡须没有任何关系,突然,我尝试呈现的每个页面都会出现此错误。
The "path" argument must be one of type string, Buffer, or URL. Received type undefined
at Object.readFile (fs.js:297:3)
at read (/home/malcolm/complice/node_modules/hogan-express/hogan-express.js:32:14)
at renderPartials (/home/malcolm/complice/node_modules/hogan-express/hogan-express.js:58:7)
答案 0 :(得分:1)
啊哈,事实证明我仍在尝试添加旧的partial
。所以我的代码如下所示。当我删除oldpage.mustache
时它坏了,而当我从下面删除oldpage
行时又能正常工作。
var partials = {
'login_form': 'login_form',
'analytics': 'analytics',
'oldpage': 'oldpage',
}
app.set('partials', partials) // define partials available to all pages