documentation icon indicating copy to clipboard operation
documentation copied to clipboard

TypeError: Cannot read property 'match' of undefined

Open jdsutton opened this issue 7 years ago • 3 comments

Code and documentation are confidential and proprietary.

Problem arises when running node_modules/documentation/bin/documentation.js build --format=html --output=documentation $(DOCS_TMP) via make.

Expected result: Documentation built in ./documentation without error.

Actual result:

TypeError: Cannot read property 'match' of undefined
    at scanIdentifier (_________/node_modules/doctrine-temporary-fork/lib/doctrine.js:263:96)
    at parseName (_________/node_modules/doctrine-temporary-fork/lib/doctrine.js:321:29)
    at TagParser.parseName (_________/node_modules/doctrine-temporary-fork/lib/doctrine.js:504:34)
    at TagParser.parse (_________/node_modules/doctrine-temporary-fork/lib/doctrine.js:773:34)
    at parseTag (_________/node_modules/doctrine-temporary-fork/lib/doctrine.js:794:26)
    at Object.parse (_________/node_modules/doctrine-temporary-fork/lib/doctrine.js:872:23)
    at parseJSDoc (_________/node_modules/documentation/lib/parse.js:574:27)
    at _addComment (_________/node_modules/documentation/lib/parsers/javascript.js:81:21)
    at parseComment (_________/node_modules/documentation/lib/extractors/comments.js:42:25)
    at Array.forEach (<anonymous>)
Makefile:169: recipe for target 'docs' failed
make: *** [docs] Error 1

documentation.js version: 7.1.0

jdsutton avatar May 31 '18 18:05 jdsutton

Would be great if the error could at least show the file and line where this comes from in my source, so I could get back to generating docs.

jdsutton avatar Jun 05 '18 22:06 jdsutton

Here is the offending comment:

*
 * @class
 * @param {String[]} labels.
 * @param {String[]} containerIds.

It appears the error is caused by the improper '.' directly after the parameter name.

Could have been caught by the lint command, but the same error occurs using that as well.

jdsutton avatar Jun 05 '18 22:06 jdsutton

Yes, it was also a . that was in an inappropriate tag (@class in my case).

Berkmann18 avatar Oct 07 '18 18:10 Berkmann18