본문 바로가기
Solve to troubleshoot

SyntaxError: Unexpected identifier in index.ejs while compiling ejs

by 살길바라냐 2020. 5. 20.
반응형

SyntaxError: Unexpected identifier in index.ejs while compiling ejs If the above error is not helpful, you may want to try EJS-Lint: https://github.com/RyanZim/EJS-Lint Or, if you meant to create an async function, pass `async: true` as an option. at new Function ()

 

원인은 include 하는 기존 방식이 제거돼서 에러가 발생했던 것이었다.

<% include ./header %>와 같이 돼있던 부분을 <%- include('header') %>와 같이 수정하면 된다.

728x90