Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

SASS files correctly parsed but the documentation is not generated #557

Open
lperamo opened this issue Jan 28, 2021 · 4 comments
Open

SASS files correctly parsed but the documentation is not generated #557

lperamo opened this issue Jan 28, 2021 · 4 comments

Comments

@lperamo
Copy link

lperamo commented Jan 28, 2021

As I said in the title and you can see it in the following report, the SASS files are correctly parsed but there is no documentation.
The folder sassdoc was created but it remains empty.
Here is my SASS version, in case it is useful 1.27.0 compiled with dart2js 2.10.1.
Do not hesitate to ask for more information. My code is not open sourced yet.

lionel-Predator-GX-792:components (feature/SASSDoc*) $ sassdoc bundles/Ecocomposer --verbose
» Folder `bundles/Ecocomposer` successfully parsed.
» Folder `sassdoc` successfully refreshed.
» [ERROR] Template render error: (/usr/local/lib/node_modules/sassdoc/node_modules/sassdoc-theme-default/views/documentation/index.html.njk)
  Template render error: (/usr/local/lib/node_modules/sassdoc/node_modules/sassdoc-theme-default/views/includes/partials/item.html.njk)
  Template render error: (/usr/local/lib/node_modules/sassdoc/node_modules/sassdoc-theme-default/views/includes/annotations/parameter.html.njk)
  TypeError: Cannot read property 'split' of undefined
    at Object._prettifyError (/usr/local/lib/node_modules/sassdoc/node_modules/nunjucks/src/lib.js:36:11)
    at /usr/local/lib/node_modules/sassdoc/node_modules/nunjucks/src/environment.js:561:19
    at eval (eval at _compile (/usr/local/lib/node_modules/sassdoc/node_modules/nunjucks/src/environment.js:631:18), <anonymous>:119:12)
    at eval (eval at _compile (/usr/local/lib/node_modules/sassdoc/node_modules/nunjucks/src/environment.js:631:18), <anonymous>:384:12)
    at /usr/local/lib/node_modules/sassdoc/node_modules/nunjucks/src/environment.js:569:11
    at eval (eval at _compile (/usr/local/lib/node_modules/sassdoc/node_modules/nunjucks/src/environment.js:631:18), <anonymous>:120:12)
    at /usr/local/lib/node_modules/sassdoc/node_modules/nunjucks/src/environment.js:569:11
    at Template.root [as rootRenderFunc] (eval at _compile (/usr/local/lib/node_modules/sassdoc/node_modules/nunjucks/src/environment.js:631:18), <anonymous>:93:3)
    at Template.render (/usr/local/lib/node_modules/sassdoc/node_modules/nunjucks/src/environment.js:550:10)
    at eval (eval at _compile (/usr/local/lib/node_modules/sassdoc/node_modules/nunjucks/src/environment.js:631:18), <anonymous>:119:10)
@pascalduez
Copy link
Member

Hi @lperamo,

looking at the error, you most likely have erroneous SassDoc annotations, or something we don't parse properly which apparently break the theme templates.
Without looking at some code we won't be able to help much.
Maybe try narrowing by just adding the annotations small pieces by small pieces, will help you spot the culprit.

There's probably something to straighten on our side as well, shouldn't crash like this.

@lperamo
Copy link
Author

lperamo commented Feb 1, 2021

I already tried to change my documentation with no avail the other day but today I succeeded to generate the SASSDoc files so...
I will test all my files line by line of documentation !
I'll keep you updated.

@lperamo
Copy link
Author

lperamo commented Feb 1, 2021

Ok, I weirdly find very quickly this time my error.
I had a SASSDoc block like this :

///
/// Main mixin that creates themed empty arrows like > using border hacks
///
/// @access public
/// @param  {array} $options ()
///

Forgotting to put the braces around array was the thing that crashes the SASSDoc library.
Hope it helps! Thanks for your time!
If you need more details to solve the crash, tell me!

@pascalduez
Copy link
Member

Leaving this one open, at least we should try to output an useful error message.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Development

No branches or pull requests

2 participants