angular-jsdoc icon indicating copy to clipboard operation
angular-jsdoc copied to clipboard

TypeError: members.forEach is not a function

Open ghost opened this issue 7 years ago • 1 comments

When i start: node_modules\.bin\jsdoc --configure node_modules\angular-jsdoc\common\conf.json --template node_modules\angular-jsdoc\angular-template --destination build\docs -r www\js

I get this error: C:\Users\marko\PlutalIonic\node_modules\angular-jsdoc\angular-template\publish.js:48 members.forEach(function(doclet) { ^ TypeError: members.forEach is not a function at getChildren (C:\Users\marko\PlutalIonic\node_modules\angular-jsdoc\angular-template\publish.js:48:11) at C:\Users\marko\PlutalIonic\node_modules\angular-jsdoc\angular-template\publish.js:258:23 at each (C:\Users\marko\PlutalIonic\node_modules\jsdoc\node_modules\taffydb\taffy.js:87:17) at Object.<anonymous> (C:\Users\marko\PlutalIonic\node_modules\jsdoc\node_modules\taffydb\taffy.js:1109:7) at Object.API.(anonymous function) [as each] (C:\Users\marko\PlutalIonic\node_modules\jsdoc\node_modules\taffydb\taffy.js:127:18) at Object.exports.publish (C:\Users\marko\PlutalIonic\node_modules\angular-jsdoc\angular-template\publish.js:257:10) at Object.module.exports.cli.generateDocs (C:\Users\marko\PlutalIonic\node_modules\jsdoc\cli.js:448:35) at Object.module.exports.cli.processParseResults (C:\Users\marko\PlutalIonic\node_modules\jsdoc\cli.js:399:20) at module.exports.cli.main (C:\Users\marko\PlutalIonic\node_modules\jsdoc\cli.js:240:14) at Object.module.exports.cli.runCommand (C:\Users\marko\PlutalIonic\node_modules\jsdoc\cli.js:189:5) at C:\Users\marko\PlutalIonic\node_modules\jsdoc\jsdoc.js:105:9 at Object.<anonymous> (C:\Users\marko\PlutalIonic\node_modules\jsdoc\jsdoc.js:106:3) at Module._compile (module.js:570:32) at Object.Module._extensions..js (module.js:579:10) at Module.load (module.js:487:32) at tryModuleLoad (module.js:446:12) npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! [email protected] gendoc: jsdoc --configure node_modules\angular-jsdoc\common\conf.json --template node_modules\angular-jsdoc\angular-template --destination build\docs -r www\js npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the [email protected] gendoc script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above. npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\marko\AppData\Roaming\npm-cache\_logs\2018-05-14T13_25_16_987Z-debug.log

I don't know what is causing it or what file is the problem. I am using Windows 10, jsdoc 3.5.5, angular-jsdoc 1.5.0, nodejs 6.10.1

ghost avatar May 14 '18 13:05 ghost

i did take a functional example from the page and start to implement my code to that template. I did take it from here

Later, did appear this error

\node_modules\angular-template\index.js:87
        throw e.raisedOnceException;
        ^

So, i did modify the file angular-jsdoc/angular-template/html/class.html

and did change

<ul class="chips">
    <li class="chip" ht-if="directiveScope">{{ directiveScope }}</li>
    <li class="chip" ht-if="restrict" ht-repeat="rest in restrict">{{rest}}</li>
  </ul>

to

<ul class="chips" ht-if="restrict">
    <li class="chip" ht-if="directiveScope">{{ directiveScope }}</li>
    <li class="chip" ht-if="restrict" ht-repeat="rest in restrict">{{rest}}</li>
  </ul>

And finally works.


By the way, if some blocks don't work, require @name

/*
 * @name menuController
 * @memberOf app
 * @ngdoc controller
 * @description
 *   This is a controller
 *   @param {object} param1 Referencia al scope del controlador.
 *   @param {object} param2 Referencia a la definición interna de url.
 */

dilakv avatar Jul 12 '18 19:07 dilakv