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

gen package or gen help throws error #6

Open
ritwik2finda opened this issue Oct 27, 2016 · 5 comments
Open

gen package or gen help throws error #6

ritwik2finda opened this issue Oct 27, 2016 · 5 comments
Labels

Comments

@ritwik2finda
Copy link

ritwik2finda commented Oct 27, 2016

I am a newbie, please help.
I just installed Node.js v6.9.1 on my windows machine

npm install --global generate and npm install --global generate-package were successful.

When I fire gen package or gen help it throws the following error:

C:\>gen help
[20:51:35] starting generate
[20:51:35] √ running tasks: [ 'defaults:help' ]
path.js:7
    throw new TypeError('Path must be a string. Received ' + inspect(path));
    ^

TypeError: Path must be a string. Received null
    at assertPath (path.js:7:11)
    at Object.resolve (path.js:186:7)
    at Function.resolve (C:\Users\admin\AppData\Roaming\npm\node_modules\generate\node_modules\parse-git-config\index.js
:116:15)
    at Function.parseSync [as sync] (C:\Users\admin\AppData\Roaming\npm\node_modules\generate\node_modules\parse-git-con
fig\index.js:79:24)
    at Schema.module.exports (C:\Users\admin\AppData\Roaming\npm\node_modules\generate\node_modules\expand-pkg\lib\expan
ders\git.js:13:36)
    at Schema.normalizeField (C:\Users\admin\AppData\Roaming\npm\node_modules\generate\node_modules\map-schema\index.js:
557:16)
    at Schema.update (C:\Users\admin\AppData\Roaming\npm\node_modules\generate\node_modules\map-schema\index.js:246:8)
    at Schema.module.exports (C:\Users\admin\AppData\Roaming\npm\node_modules\generate\node_modules\expand-pkg\lib\expan
ders\owner.js:14:10)
    at Schema.normalizeField (C:\Users\admin\AppData\Roaming\npm\node_modules\generate\node_modules\map-schema\index.js:
557:16)
    at Schema.normalize (C:\Users\admin\AppData\Roaming\npm\node_modules\generate\node_modules\map-schema\index.js:497:2
7)
@jonschlinkert
Copy link
Member

It looks like a bug, I believe it's failing because it can't find a local or global git config path. I might have just fixed the root cause of this last night, but I'll need to update the underlying modules in generate before you receive the benefit of that fix.

Thanks for reporting, and I'm really sorry you had this as your first experience with generate. I'll update here after I make the necessary change.

@ritwik2finda
Copy link
Author

Thank you. Please let me know once done.
In the mean time is there a work-around for this?

@jonschlinkert
Copy link
Member

It might be resolved if you install git. Unless git is already installed, in which case I'm wrong about what's causing it

@ritwik2finda
Copy link
Author

Git is already installed. It had thrown a different error when I had a problem with git. I was able to resolve it by reinstalling git. And git is setup in the PATH variable as well

@jonschlinkert
Copy link
Member

Hmm, I wasn't able to reproduce this on mac or windows. I'm not sure what's causing it, but I'll leave this open in case anyone else encounters the issue.

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