New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ejs throws error <%= ":" _ %>
for a space between _ and %> - SyntaxError: missing ) after argument list
#334
Comments
In this case, the error is not coming from the EJS tag-matching code. It an ordinary JavaScript |
That's beautiful catch. Thanks. |
Just for extra information if someone is using a condition in ejs |
this is how it looks like my index.ejs,,,
but when i inspect my web page am getting my anchor values a[ object object ],,,,,,any suggestion @mde `` |
@milleymilli your each element of the array is of json type {link:'',title:''},html cannot render this json object..it needs a particular value like integer,string,etc.. |
<% if(kindOfDay === "Saturday" || kindOfDay === "Sunday"){ %> <%= kindOfDay%> ToDo List<% } else %> { <%= kindOfDay%> ToDO List<% } %> SyntaxError: Missing catch or finally after try in C:\Users\Admin\desktop\to-do-list\views\List.ejs while compiling ejs If the above error is not helpful, you may want to try EJS-Lint: |
I had this error thrown by ejs which ejs-lint couldn't detect.
for a code like,
<%= ":" _ %>
First of all it should not throw an error as this code has both <% and %>. But this ejs detects this space (' ') between _ %> and throws an error.
It could be a meaning full error , may be like , its missing a closing '%>' - would be more appropriate.
But it was very hard for me to locate this little space in the large file!
The text was updated successfully, but these errors were encountered: