TypeError: Cannot call method 'split' of undefined #4

Closed
nik-kor opened this Issue Dec 17, 2012 · 2 comments

Comments

Projects
None yet
2 participants

nik-kor commented Dec 17, 2012

I'am not sure is it a bug, But when I run jsdoc task I got:

->./node_modules/.bin/grunt jsdoc
Running "jsdoc:dist" (jsdoc) task

TypeError: Cannot call method 'split' of undefined
    at module.exports.jsDocLookup (/home/nick/dev/ged/www/ged.js/node_modules/grunt-jsdoc-plugin/tasks/jsdoc-plugin.js:69:19)
    at Object.registerJsdocTask (/home/nick/dev/ged/www/ged.js/node_modules/grunt-jsdoc-plugin/tasks/jsdoc-plugin.js:83:11)
    at Object.task.registerMultiTask.thisTask (/home/nick/dev/ged/www/ged.js/node_modules/grunt/lib/grunt/task.js:109:15)
    at Object.task.registerTask.thisTask.fn (/home/nick/dev/ged/www/ged.js/node_modules/grunt/lib/grunt/task.js:58:16)
    at Task.<anonymous> (/home/nick/dev/ged/www/ged.js/node_modules/grunt/lib/util/task.js:343:36)
    at Task.<anonymous> (/home/nick/dev/ged/www/ged.js/node_modules/grunt/lib/util/task.js:319:9)
    at Task.<anonymous> (/home/nick/dev/ged/www/ged.js/node_modules/grunt/lib/util/task.js:346:11)
    at Task.start (/home/nick/dev/ged/www/ged.js/node_modules/grunt/lib/util/task.js:359:5)
    at Object.grunt.tasks (/home/nick/dev/ged/www/ged.js/node_modules/grunt/lib/grunt.js:143:8)
    at Object.module.exports [as cli] (/home/nick/dev/ged/www/ged.js/node_modules/grunt/lib/grunt/cli.js:36:9)

The reason is that nodePath is undefined in jsDocLookup function in tasks/jsdoc-plugin.js

So if I run task as

->NODE_PATH=`which node` ./node_modules/.bin/grunt jsdoc

everything seems ok

Owner

krampstudio commented Dec 17, 2012

It's strange that the NODE_PATH env isn't setup. But I'll check it's existence instead of assuming it is defined.
0.1.2 coming soon with that patch.
Thanks for your feedback!

@ghost ghost assigned krampstudio Dec 17, 2012

Owner

krampstudio commented Dec 17, 2012

Fixed in v0.1.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment