Skip to content

Errors thrown with tutorial tag. #87

Closed
@Legend-of-iPhoenix

Description

@Legend-of-iPhoenix

Attempting to generate a tutorial link through @tutorial identifier, ex.

/**
 * @tutorial my-awesome-tutorial
 */
class Example {}

throws the following error:

undefined:128
((__t=( self.tutoriallink(t) ))==null?'':__t)+
             ^

TypeError: self.tutoriallink is not a function
    at eval (eval at template (PROJECT_DIR/node_modules/underscore/underscore.js:1596:16), <anonymous>:128:14)
    at Array.forEach (<anonymous>)
    at Template.eval (eval at template (PROJECT_DIR/node_modules/underscore/underscore.js:1596:16), <anonymous>:126:12)
    at Template.template (PROJECT_DIR/node_modules/underscore/underscore.js:1603:21)
    at Template.partial (PROJECT_DIR/node_modules/jsdoc/lib/jsdoc/template.js:55:33)
    at Template.eval (eval at template (PROJECT_DIR/node_modules/underscore/underscore.js:1596:16), <anonymous>:87:14)
    at Template.template (PROJECT_DIR/node_modules/underscore/underscore.js:1603:21)
    at Template.partial (PROJECT_DIR/node_modules/jsdoc/lib/jsdoc/template.js:55:33)
    at eval (eval at template (PROJECT_DIR/node_modules/underscore/underscore.js:1596:16), <anonymous>:105:14)
    at Array.forEach (<anonymous>)
    at Template.eval (eval at template (PROJECT_DIR/node_modules/underscore/underscore.js:1596:16), <anonymous>:8:10)
    at Template.template (PROJECT_DIR/node_modules/underscore/underscore.js:1603:21)
    at Template.partial (PROJECT_DIR/node_modules/jsdoc/lib/jsdoc/template.js:55:33)
    at Template.render (PROJECT_DIR/node_modules/jsdoc/lib/jsdoc/template.js:69:28)
    at generate (PROJECT_DIR/node_modules/better-docs/publish.js:244:15)
    at PROJECT_DIR/node_modules/better-docs/publish.js:745:7

Additionally, attempting to give a tutorial children as described in the documentation throws this related but separate error:

undefined:10
((__t=( self.tutoriallink(t.name) ))==null?'':__t)+
             ^

TypeError: self.tutoriallink is not a function
    at eval (eval at template (PROJECT_DIR/node_modules/underscore/underscore.js:1596:16), <anonymous>:10:14)
    at Array.forEach (<anonymous>)
    at Template.eval (eval at template (PROJECT_DIR/node_modules/underscore/underscore.js:1596:16), <anonymous>:8:18)
    at Template.template (PROJECT_DIR/node_modules/underscore/underscore.js:1603:21)
    at Template.partial (PROJECT_DIR/node_modules/jsdoc/lib/jsdoc/template.js:55:33)
    at Template.render (PROJECT_DIR/node_modules/jsdoc/lib/jsdoc/template.js:69:28)
    at generateTutorial (PROJECT_DIR/node_modules/better-docs/publish.js:779:21)
    at PROJECT_DIR/node_modules/better-docs/publish.js:790:7
    at Array.forEach (<anonymous>)
    at saveChildren (PROJECT_DIR/node_modules/better-docs/publish.js:789:19)
    at Object.exports.publish (PROJECT_DIR/node_modules/better-docs/publish.js:795:3)
    at Object.module.exports.cli.generateDocs (PROJECT_DIR/node_modules/jsdoc/cli.js:441:39)
    at Object.module.exports.cli.processParseResults (PROJECT_DIR/node_modules/jsdoc/cli.js:392:24)
    at module.exports.cli.main (PROJECT_DIR/node_modules/jsdoc/cli.js:235:18)
    at Object.module.exports.cli.runCommand (PROJECT_DIR/node_modules/jsdoc/cli.js:186:9)
    at PROJECT_DIR/node_modules/jsdoc/jsdoc.js:93:9

Note that using an inline tutorial tag, ex. with {@tutorial my-awesome-tutorial} works fine.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions