具体异常信息
1| 2| //添加片段视图 >> 3| <%- partial('listitem',items) -%> 4| partial is not defined at eval (eval at (E:\nodejsWP\blog\node_modules\ejs\lib\ejs.js:236:14), :29:46) at eval (eval at (E:\nodejsWP\blog\node_modules\ejs\lib\ejs.js:236:14), :29:91)
原因
Express 3.x 不再支持partial。可以通过“include”
<%- include myview.ejs %>
app.set("views", "path/to/views")