documentationjs/gulp-documentation

TypeError: Cannot read property 'forEach' of undefined

kevincaradant opened this issue · 17 comments

Hi,

I get this now but i don't know why :/ , any idea ?

Thank you :)
Édit : i use gulp-document 2.2.0, same thing with 2.1.0, i tried so many things without success during 2 hours but i dont know why i get This error. Its mysterious :/

image

When I try to use format: 'html' I get cannot read property 'forEach' of undefined. Yet, when I try to use format: 'md' I get cannot read property 'reduce' of undefined.

Same problem here, any tips?

I'm having the same issue JordanMajd describes.

+1

Also having this problem.

+1
UPD:
On screenshot I see documentation\index.js:83:14
Im my case its documentation\index.js:109:7
Both lines provide an error object as first argument of callback.

tmcw commented

Can anyone share their gulp configuration? Thanks!

Hi!
Having same issue, both md and html.
Using gulp task as described in your documentation:

gulp.task('documentation', function () {

  gulp.src('./app.js')
    .pipe(documentation({ format: 'md' }))
    .pipe(gulp.dest('md-documentation'));

});

I think upgrading to documentation v4 will solve the problem. I used documentation 4 beta 2 directly from the command line and it works as it should.

+1
screen shot 2016-06-09 at 10 47 55

nrser commented

i hit a similar issue (which searching for led me here). i knew my problem was from documentation.js failing at dependency resolution.

adding the shallow: true option let me run it successfully. though, of course, it's not resolving the dependencies.

i just installed documentation.js and i have a meteor project with funky requires so i have no idea what i'm missing, but this might at least let you run something:

gulp.task('doc', () => {
  gulp.src('blah.js')
    .pipe(documentation({shallow: true, format: 'md'}))
    .pipe(gulp.dest('./doc'));
});

+1

Hi guys, I know I'm the author of this issue but today, I don't use anymore gulp, so I don't have follow the evolution of this issue. I don't close it but if you think it's good, I let you to close this issue. Good luck ;)

Please update to "documentation": "^4.0.0-beta11"