pchab / ProjectRTC

WebRTC Live Streaming on nodeJS (+ android client !)
Other
1.04k stars 476 forks source link

SyntaxError: Unexpected identifier in ProjectRTC/views/index.ejs while compiling ejs #18

Closed alibitek closed 9 years ago

alibitek commented 9 years ago

Any ideas what I get the following error?

SyntaxError: Unexpected identifier in ProjectRTC/views/index.ejs while compiling ejs
   at Function (native)
   at Object.Template.compile (ProjectRTC/node_modules/ejs/lib/ejs.js:460:12)
   at Object.compile (ProjectRTC/node_modules/ejs/lib/ejs.js:288:16)
   at handleCache (ProjectRTC/node_modules/ejs/lib/ejs.js:147:16)
   at View.exports.renderFile [as engine] (ProjectRTC/node_modules/ejs/lib/ejs.js:350:14)
   at View.render (ProjectRTC/node_modules/express/lib/view.js:126:8)
   at tryRender (ProjectRTC/node_modules/express/lib/application.js:639:10)
   at EventEmitter.render (ProjectRTC/node_modules/express/lib/application.js:591:3)
   at ServerResponse.render (ProjectRTC/node_modules/express/lib/response.js:961:7)
   at index (ProjectRTC/app/routes.js:5:9)
alibitek commented 9 years ago

The problem seems be related to the following lines from index.ejs:

<%= include local-cam %>
<%= include remote-streams %>
alibitek commented 9 years ago

Found the culprit. The syntax for including an ejs file in another file is incorrect. It should be:

<% include local-cam %>
<% include remote-streams %>

As per https://github.com/tj/ejs#includes