fbrctr / fabricator

A tool for building website UI toolkits and style guides
http://fbrctr.github.io/
MIT License
1.11k stars 124 forks source link

Error (fabricator-assemble): You must pass a string or Handlebars AST to Handlebars.compile. You passed undefined #314

Open tklives opened 5 years ago

tklives commented 5 years ago

I decided to open a new issue for this with the fix, rather than commenting on an already closed similar issue (but not same), just in case anyone stumbles upon this post with a similar error looking for any hints.

I've noticed that this error can also occur if your filename contains numbers followed by a hyphen beyond an ordering prefix at the beginning of the filename (i.e. 00-flex-layout-3-up.html).

In this case, changing the file name to '00-flex-layout-3up.html' would also work, but if in the toolkit you want your component's section heading to contain a space in the name, then using underscores for any part of your filename after the ordering prefix is the way to go.

So, in short, changing a name like '00-flex-layout-3-up.html' to '00-flex_layout_3_up.html' will achieve the desired result and alleviate the error.

Hope this helps someone!