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

YAMLException: can not read a block mapping entry; #241

Closed darrenbarklie closed 8 years ago

darrenbarklie commented 8 years ago

I've really enjoyed working with Fabricator so far, however I've hit an error that I'm not sure how to resolve.

Making edits to files in the project trigger the assemble:watch command to refresh the browser, however no saves are reflected in the updated window. Rolling back to previous commits doesn't appear to help so would appreciate any support.

[03:05:21] Starting 'assemble'...
Error (fabricator-assemble): can not read a block mapping entry; a multiline key may not be an implicit key at line 7, column 1:
YAMLException: can not read a block mapping entry; a multiline key may not be an implicit key at line 7, column 1:
at generateError (../project/node_modules/js-yaml/lib/js-yaml/loader.js:161:10)
    at throwError (../project/node_modules/js-yaml/lib/js-yaml/loader.js:167:9)
    at readBlockMapping (../project/node_modules/js-yaml/lib/js-yaml/loader.js:1039:9)
    at composeNode (../project/node_modules/js-yaml/lib/js-yaml/loader.js:1327:12)
    at readDocument (../project/node_modules/js-yaml/lib/js-yaml/loader.js:1490:3)
    at loadDocuments (../project/node_modules/js-yaml/lib/js-yaml/loader.js:1546:5)
    at load (../project/node_modules/js-yaml/lib/js-yaml/loader.js:1563:19)
    at safeLoad (../project/node_modules/js-yaml/lib/js-yaml/loader.js:1581:10)
    at matter (../project/node_modules/gray-matter/index.js:89:18)
    at Function.matter.read (/../project/node_modules/gray-matter/index.js:136:13)
[03:05:21] Finished 'assemble' after 9.85 ms
[03:05:21] Starting 'assemble:watch'...
LukeAskew commented 8 years ago

Looks like a YAML parsing error. Make sure you're only using spaces and not tabs in the YAML files.

darrenbarklie commented 8 years ago

Not sure how this occurred; I combed through the offending loader.js file to no avail. Thankfully a clean install and porting my SASS and modules resolved things. Many thanks for the support @LukeAskew and thanks once again for an awesome framework.

evgenious commented 8 years ago

Had the same problem, the cause of it was wrong syntaxing in the comments of fabricator. Most common failure may be beginning a new line without "|".

brelian commented 7 years ago

Same problem, the reason is that there is not a space between tags and tag name. like this tags:PHP ==> tags: PHP

zhouxincheng commented 6 years ago

syncher-bin is right for me

Roralee commented 5 years ago

I just had this issue pop up out of nowhere w/ one of my structure templates. Double check and make sure that the file uses spaces instead of tabs for indentation.

jsj14 commented 5 years ago

or you may have added a " somewhere in between in the previous line line 6 which is read mistakenly

description: "Have you ever heard your colleagues say "Just Kidding" in the middle of serious meetings "
date: "2019-06-08T17:32:57.143Z"

I got the exact same error for the above.

When I replaced the "Just Kidding" with 'Just Kidding' It worked.

CkCreative commented 5 years ago

or you may have added a " somewhere in between in the previous line line 6 which is read mistakenly

description: "Have you ever heard your colleagues say "Just Kidding" in the middle of serious meetings "
date: "2019-06-08T17:32:57.143Z"

I got the exact same error for the above.

When I replaced the "Just Kidding" with 'Just Kidding' It worked.

This worked for me. There was a don't in a previous line and that caused issues.