I still get this error, because my project structure forces me to load the task from another location than the current one (via loadTasks("path/to/jsdoc-contrib")).
The task tries to resolve jsdoc based on the current path (cwd) and not from the script location (__dirname).
Changing the line
var base = 'node_modules/jsdoc/jsdoc',
to
var base = __dirname + '/../node_modules/jsdoc/jsdoc',
would fix this issue.
I still get this error, because my project structure forces me to load the task from another location than the current one (via
loadTasks("path/to/jsdoc-contrib")).The task tries to resolve jsdoc based on the current path (
cwd) and not from the script location (__dirname).Changing the line
to
would fix this issue.