End of the Stream or Document Separator is Expected - Stencil Bundle Error

in , July 9th, 2024
person facing monitor while typing during daytime

Formatting Error in Stencil Theme

When bundling your stencil theme, a common error that you will get is as follows.

Error: Error: end of the stream or a document separator is expected (3:98)

This error concerns how your HTML files are formatted in your stencil theme. It is a blocker to bundling your stencil theme and will prevent you from pushing your theme to the BigCommerce environment.

Resolving this Stencil Bundle Error

One thing that will cause this problem revolves around comments in both HTML and handlebars. This happens when you have three or more consecutive hyphens (-) in a row. This is because the HTML file will read it as a YAML statement.

The simple solution is to read the error code, locate the issued code, and remove the hyphen. Below is a common example with HTML comments.

<!---This is a comment--->

Turn the above into the below.

<!--This is a better comment that doesn't break stencil-->
Note: You will want to read the error code to find which file is causing the error. Stencil uses YAML very frequently, so global searching for “---” may make it difficult to find your error.

Author: Maxwell Sherwin


Got stuck on a step in this article?

We like to update our blogs and articles to make sure they help resolve any troubleshooting difficulties you are having. Sometimes, there is a related feature to enable or a field to fill out that we miss during the instructions. If this article didn't resolve the issue, please use the chat and let us know so that we can update this article!

 
 

Want to keep learning?

Our team of NetSuite professionals has written articles on a wide variety of NetSuite topics, from SuiteCommerce tips, to recommended NetSuite solutions, to available support services, and more! 

Your cart