usrz / javascript-grunt-jsdoc-ng

Grunt task to run jsDoc without Java.
4 stars 2 forks source link

Incompatible with latest JSDoc (3.4.0) #3

Open mstock opened 8 years ago

mstock commented 8 years ago

It seems that the latest JSDoc version (3.4.0 at the time of this writing) had an incompatible API change, which results in an exception when generating the documentation (I noticed this after removing node_modules in a project and reinstalling everything using npm install, which resulted in broken documentation generation):

~/js/javascript-grunt-jsdoc-ng$ grunt samples --stack
Running "ngtemplates:default" (ngtemplates) task
File dist/jsdoc-ng-templates.js created.

Running "uglify:defaut" (uglify) task
>> 1 file created.

Running "less:defaut" (less) task
File dist/jsdoc-ng.min.css created: 7.97 kB → 5.42 kB

Running "jsdoc-ng:dist" (jsdoc-ng) task
NOM DESC A JsDoc3 plugin for Grunt plus an AngularJS based template
Warning: Arguments to path.join must be strings Use --force to continue.
TypeError: Arguments to path.join must be strings
    at path.js:360:15
    at Array.filter (native)
    at Object.exports.join (path.js:358:36)
    at Object.exports.getModulePath (/home/vagrant/js/javascript-grunt-jsdoc-ng/node_modules/jsdoc/lib/jsdoc/util/runtime.js:88:17)
    at Object.<anonymous> (/home/vagrant/js/javascript-grunt-jsdoc-ng/node_modules/jsdoc/lib/jsdoc/fs.js:71:31)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Object.load (/home/vagrant/js/javascript-grunt-jsdoc-ng/node_modules/jsdoc/node_modules/requizzle/lib/loader.js:112:15)
    at Requizzle.requizzle (/home/vagrant/js/javascript-grunt-jsdoc-ng/node_modules/jsdoc/node_modules/requizzle/lib/requizzle.js:90:24)

Aborted due to warnings.

'Downgrading' jsdoc to 3.3.3 in package.json 'fixes' this issue (i.e. replacing ^3.3.0-alpha10 with 3.3.3). According to the changelog, "JSDoc's app and env global variables are now deprecated. Avoid using the app global. Use the jsdoc/env module instead of the env global.".

ghost commented 8 years ago

I faced with the same issue: Running "jsdoc-ng:main" (jsdoc-ng) task NOM DESC Triangle Warning: Arguments to path.join must be strings Use --force to continue. TypeError: Arguments to path.join must be strings at path.js:360:15 at Array.filter (native) at Object.exports.join (path.js:358:36) at Object.exports.getModulePath (/var/www/html/projects/triangle/grunt/node_modules/grunt-jsdoc-ng/node_modules/jsdoc/lib/jsdoc/util/runtime.js:89:17) at Object. (/var/www/html/projects/triangle/grunt/node_modules/grunt-jsdoc-ng/node_modules/jsdoc/lib/jsdoc/fs.js:71:31) at Module._compile (module.js:456:26) at Object.Module._extensions..js (module.js:474:10) at Module.load (module.js:356:32) at Object.load (/var/www/html/projects/triangle/grunt/node_modules/grunt-jsdoc-ng/node_modules/jsdoc/node_modules/requizzle/lib/loader.js:112:15) at Requizzle.requizzle (/var/www/html/projects/triangle/grunt/node_modules/grunt-jsdoc-ng/node_modules/jsdoc/node_modules/requizzle/lib/requizzle.js:90:24)

I changed jsdoc version in package.json but it did not fixed the bug. Thank you in advance.

mmfilesi commented 8 years ago

Same bad result... : (

Warning: Arguments to path.join must be strings Use --force to continue.