gruntjs / gruntjs/grunt-init

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

Open
#70 3 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
JavaScript
Stars
195
Forks
57
PR merge metrics
No merged PRs in 30d

Description

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 (rr.rossmann@me.com)
[?] 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
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.