nikhilmodak / gulp-ngdocs

Gulp plugin for building angularJS documentation
MIT License
95 stars 64 forks source link

TypeError: Cannot read property 'replace' of undefined #51

Open xduseko opened 9 years ago

xduseko commented 9 years ago

This error is thrown without any details, it's hard to find out where the problem is in large projects with many files.

[TypeError: Cannot read property 'replace' of undefined]
events.js:85
      throw er; // Unhandled 'error' event
            ^
TypeError: Cannot read property 'replace' of undefined
    at C:\Users\odusek\IdeaProjects\ideapoly2_fe\node_modules\gulp-ngdocs\index.js:218:26
    at Array.forEach (native)
    at DestroyableTransform.flushFunction [as _flush] (C:\Users\odusek\IdeaProjects\ideapoly2_fe\node_modules\gulp-ngdocs\index.js:216:21)
    at DestroyableTransform.<anonymous> (C:\Users\odusek\IdeaProjects\ideapoly2_fe\node_modules\gulp-ngdocs\node_modules\through2\node_modules\readable-stream\lib\_stream_transform.js:135:12)
    at DestroyableTransform.g (events.js:199:16)
    at DestroyableTransform.emit (events.js:129:20)
    at finishMaybe (C:\Users\odusek\IdeaProjects\ideapoly2_fe\node_modules\gulp-ngdocs\node_modules\through2\node_modules\readable-stream\lib\_stream_writable.js:371:12)
    at endWritable (C:\Users\odusek\IdeaProjects\ideapoly2_fe\node_modules\gulp-ngdocs\node_modules\through2\node_modules\readable-stream\lib\_stream_writable.js:378:3)
    at DestroyableTransform.Writable.end (C:\Users\odusek\IdeaProjects\ideapoly2_fe\node_modules\gulp-ngdocs\node_modules\through2\node_modules\readable-stream\lib\_stream_writable.js:356:5)
    at DestroyableTransform.onend (C:\Users\odusek\IdeaProjects\ideapoly2_fe\node_modules\gulp\node_modules\vinyl-fs\node_modules\through2\node_modules\readable-stream\lib\_stream_readable.js:523:10)

This one was caused by missing @name annotation in @ndgoc overview section.

gamebox commented 8 years ago

Had the same problem for the same reason. Thanks for the PR @xduseko