undefined is not a function

Posted liziyou

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了undefined is not a function相关的知识,希望对你有一定的参考价值。

具体报错

TypeError: c:\Users\Administrator\WebstormProjects\blogtest\views\index.ejs:1
 >> 1| <%- include header %>
    2| <form>
    3|   <div class="input-group">
    4|     <input type="text" class="form-control" placeholder="SEARCH" name="keyword">

undefined is not a function

这是因为我使用<% %>导入文件的时候,忘记写了后缀名.ejs 改成

<%- include header.ejs %>  

以上是关于undefined is not a function的主要内容,如果未能解决你的问题,请参考以下文章