Handlebars - Expecting 'OPEN_INVERSE_CHAIN', 'INVERSE', 'OPEN_ENDBLOCK', got 'EOF'
Error states:
Expecting (...), got EOF
Where:
- (...) is what it can possibly expect
- EOF is End of File
What you are missing is closing {{/each}}
:
{{#each list}}<ul> <li>{{@index}}. {{this}}</li></ul></br>{{{htmlTag}}} {{#if user.admin}}<button class="launch">Launch Spacecraft</button> {{else}}<button class="login"> Log in</button> {{/if}} {{!-- This is a comment --}}{{/each}} <!-- HERE -->
This is always as a result of not closing either {{each}}
, {{if}}
, or any other control statements, but it cannot be caused by unclosed html tags like <div>
, <p>
, or any other html tags.
this is because you missed closing {{#each}}
.add {{/each}}
at the end of your loop.