Handlebars - Expecting 'OPEN_INVERSE_CHAIN', 'INVERSE', 'OPEN_ENDBLOCK', got 'EOF' Handlebars - Expecting 'OPEN_INVERSE_CHAIN', 'INVERSE', 'OPEN_ENDBLOCK', got 'EOF' express express

Handlebars - Expecting 'OPEN_INVERSE_CHAIN', 'INVERSE', 'OPEN_ENDBLOCK', got 'EOF'


Error states:

Expecting (...), got EOF

Where:

  1. (...) is what it can possibly expect
  2. 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.