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

Error: Arguments to path.join must be strings while building gruntplugin template #70

Open
robertrossmann opened this issue Jan 12, 2014 · 3 comments
Labels

Comments

@robertrossmann
Copy link
Contributor

While trying to grunt-init gruntplugin I am getting the following error:
Fatal error: Arguments to path.join must be strings

This only seems to happen if I provide custom value to Project git repository question. If I leave it at default, the script finishes successfully.

UPDATE: Further testing revealed and @jchris confirmed that this is related to a misspelled value in the Licenses question. Not sure, however, why it would fail for BSD-3-Clause.

I have no idea where to look in the code base, but here's the full stack trace that is shown upon the error. If there's more info I can provide just let me know.

Thanks for your help!

Please answer the following:
[?] Project name (grunt-npm-publish) 
[?] Description (The best Grunt plugin ever.) 
[?] Version (0.1.0) 
[?] Project git repository (git://github.com/BeBe/grunt-npm-publish.git) git://github.com/Dreamscapes/grunt-npm-publish.git
[?] Project homepage (https://github.com/Dreamscapes/grunt-npm-publish) 
[?] Project issues tracker (https://github.com/Dreamscapes/grunt-npm-publish/issues) 
[?] Licenses (MIT) BSD-3-Clause
[?] Author name (Robert Rossmann) 
[?] Author email ([email protected]) 
[?] Author url (none) https://github.com/Alaneor
[?] What versions of grunt does it require? (~0.4.2) 
[?] What versions of node does it run on? (>= 0.8.0) 
[?] Do you need to make any changes to the above before continuing? (y/N) 

Writing .gitignore...OK
Writing .jshintrc...OK
Writing Gruntfile.js...OK
Writing README.md...OK
Writing tasks/npm_publish.js...OK
Writing test/expected/custom_options...OK
Writing test/expected/default_options...OK
Writing test/fixtures/123...OK
Writing test/fixtures/testing...OK
Writing test/npm_publish_test.js...OK
Fatal error: Arguments to path.join must be strings
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.file.isPathAbsolute (/usr/lib/node_modules/grunt-init/node_modules/grunt/lib/grunt/file.js:397:28)
    at Object.grunt.util._.extend.copy (/usr/lib/node_modules/grunt-init/tasks/init.js:343:25)
    at /usr/lib/node_modules/grunt-init/tasks/init.js:381:16
    at Array.forEach (native)
    at Object.grunt.util._.extend.copyAndProcess (/usr/lib/node_modules/grunt-init/tasks/init.js:367:28)
    at /Users/BeBe/.grunt-init/gruntplugin/template.js:80:10
    at /usr/lib/node_modules/grunt-init/tasks/lib/prompt.js:124:13
@jchris
Copy link

jchris commented Jan 12, 2014

I get this error when I misspell "Apache-2.0" in the setup prompt.

Fatal error: Arguments to path.join must be strings

@robertrossmann
Copy link
Contributor Author

Just tested this and it really seems to be an issue with the license... If I leave it at default (MIT), the task will complete successfully even if I provide custom URLs.

What's wrong with BSD-3-Clause, though?

@ajmichels
Copy link

+1 GPL

@vladikoff vladikoff added the bug label Apr 4, 2014
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

4 participants