Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

135
Views
Handlebars js rendering ends short with big data sets

I am working with express and handlebars

I have encountered this problem several times now and I cannot find any mention of it anywhere.

I always encounter this problem with code inside a script tag, but I believe it can happen in any tag; when I use big data sets in an {{#each}} loop the user is served an incomplete html page where the code in the script tag ends mid line with a "..." and everything after it, including hard coded lines, are lost. Interestingly, the </script> tag, and all the html after it are rendered correctly, it is just the code inside that script tag that is lost. See screenshot below for an example. enter image description here

The threshold for the size of the data set that makes this error occur seems very low. I did some tests on the example above, and found that it only works correctly when the list has 1 element, as soon as there are 2 or more elements in the list, the error occurs. (the list I'm using just has big strings for every element like the ones seen above)

The handlebars each loop I'm using is very simple, just-

{{#each stringList}}
appRowMap["row{{@index}}"] = "{{this}}".toLowerCase();
{{/each}}

Does anyone know why this happens and how to get around this problem?

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!