Closed damirka closed 7 years ago
Same issue on my side
To @moroine:
I've found a way to fix this but it's completely incorrect and weird. Just added this condition:
// in /usr/lib/node_modules/esdoc/out/Publisher/Builder/DocBuilder#1288
if (prop.name === undefined) {
return ice;
}
If you need a quick fix to generate docs - this can work. But I don't recommend to do it in any other case.
UPD: There's an ice.loop('property', properties, function (i, prop, ice) { ... })
block and in some cases (I didn't go further) prop can be an empty object or smth. So the name property is undefined.
It's funny that I've been migrating from JSDoc and after I removed some JSDoc tags (as I see now) it began to work properly even without this fix. :8ball:
Here's an example that throws a similar error
export class Product {
constructor ( a , b ) {
this.a = a ;
this.b = b ;
}
zero ( ) {
return [ this.a.zero( ) , this.b.zero( ) ] ;
}
plus ( [ a , b ] , [ A , B ] ) {
return [ this.a.plus( a , A ) , this.b.plus( b , B ) ] ;
}
}
Commenting out the plus
method or adding
/**
* @param first
* @param second
*/
just before the plus
method makes esdoc work again.
Seems to me it's somehow related to destructive assignment and it's parsing. Did you try any other ways?
// like this one
function example({ a: A, b: B }, c = null, [ d = null ]) {
// check params inside
}
No but I think your guess is correct.
Thanks for this report.
I will fix this bug in next version.
I fixed this bug. https://github.com/esdoc/esdoc/commit/c8ae3f54837446febb37ac675677d4302552380f
And will release in next version.
Getting this error when trying to generate docs for multiple files.
Here is a log:
And this is my config: