CouscousPHP / Couscous

Couscous is good.
https://couscous.io
Other
839 stars 104 forks source link

Unable to parse at line 1 (near "YAML"). #234

Open StephanMeijer opened 5 years ago

StephanMeijer commented 5 years ago

Project: https://github.com/linkorb/php-conventions

Trouble might have occurred after changing directory structure.

$ php vendor/bin/couscous -vvv preview
Generating /Users/steve/Projects/linkorb/php-conventions to /Users/steve/Projects/linkorb/php-conventions/.couscous/generated
[notice] Fetching template from https://github.com/linkorb/linkorb-couscous-template.git

In Parser.php line 391:

  [Symfony\Component\Yaml\Exception\ParseException]  
  Unable to parse at line 1 (near "YAML").           

Exception trace:
 () at /Users/steve/Projects/linkorb/php-conventions/vendor/symfony/yaml/Parser.php:391
 Symfony\Component\Yaml\Parser->doParse() at /Users/steve/Projects/linkorb/php-conventions/vendor/symfony/yaml/Parser.php:96
 Symfony\Component\Yaml\Parser->parse() at /Users/steve/Projects/linkorb/php-conventions/vendor/mnapoli/front-yaml/src/Bridge/Symfony/SymfonyYAMLParser.php:36
 Mni\FrontYAML\Bridge\Symfony\SymfonyYAMLParser->parse() at /Users/steve/Projects/linkorb/php-conventions/vendor/mnapoli/front-yaml/src/Parser.php:78
 Mni\FrontYAML\Parser->parse() at /Users/steve/Projects/linkorb/php-conventions/vendor/couscous/couscous/src/Module/Markdown/Step/ParseMarkdownFrontMatter.php:33
 Couscous\Module\Markdown\Step\ParseMarkdownFrontMatter->__invoke() at /Users/steve/Projects/linkorb/php-conventions/vendor/couscous/couscous/src/Generator.php:47
 Couscous\Generator->generate() at /Users/steve/Projects/linkorb/php-conventions/vendor/couscous/couscous/src/Application/Cli/PreviewCommand.php:161
 Couscous\Application\Cli\PreviewCommand->generateWebsite() at /Users/steve/Projects/linkorb/php-conventions/vendor/couscous/couscous/src/Application/Cli/PreviewCommand.php:109
 Couscous\Application\Cli\PreviewCommand->execute() at /Users/steve/Projects/linkorb/php-conventions/vendor/symfony/console/Command/Command.php:255
 Symfony\Component\Console\Command\Command->run() at /Users/steve/Projects/linkorb/php-conventions/vendor/symfony/console/Application.php:908
 Symfony\Component\Console\Application->doRunCommand() at /Users/steve/Projects/linkorb/php-conventions/vendor/symfony/console/Application.php:269
 Symfony\Component\Console\Application->doRun() at /Users/steve/Projects/linkorb/php-conventions/vendor/symfony/console/Application.php:145
 Symfony\Component\Console\Application->run() at /Users/steve/Projects/linkorb/php-conventions/vendor/couscous/couscous/bin/couscous:43

preview [--target TARGET] [--livereload [LIVERELOAD]] [--config CONFIG] [--] [<address> [<source>]]

Relevant information:

PHP 7.3.1 (cli) (built: Jan 10 2019 13:15:37) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.3.1, Copyright (c) 1998-2018 Zend Technologies
    with Zend OPcache v7.3.1, Copyright (c) 1999-2018, by Zend Technologies
            "name": "couscous/couscous",
            "version": "1.7.1",
            "source": {
                "type": "git",
                "url": "https://github.com/CouscousPHP/Couscous.git",
                "reference": "53fe638587095c5262b71ec8fe3cf2e7ed692c85"
            }
mnapoli commented 5 years ago

The error is not really clear but the step is ParseMarkdownFrontMatter

That probably means one of your article/page contains invalid YAML at the top of the Markdown.