Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

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

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

nik-kor opened this issue Dec 17, 2012 · 2 comments
Assignees
Labels

Comments

@nik-kor
Copy link

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

@krampstudio
Copy link
Owner

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!

@krampstudio
Copy link
Owner

Fixed in v0.1.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants