generate / generate-node

Generate a generic node.js project, with everything you need to begin writing code and easily publish the project to npm.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

TypeError: Path must be a string. Received null

Kequc opened this issue · comments

commented

I ran the following after installing node on a clean installation of ubuntu.

$ node -v
v7.4.0
$ npm i -g generate
$ npm i -g generate-node
$ gen node

I get the following output.

[19:06:40] starting generate
[19:06:40] ✔ running tasks: [ 'node' ]
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:1146:7)
    at Function.resolve (/home/kequc/.linuxbrew/lib/node_modules/generate-node/node_modules/parse-git-config/index.js:114:22)
    at Function.parseSync [as sync] (/home/kequc/.linuxbrew/lib/node_modules/generate-node/node_modules/parse-git-config/index.js:79:24)
    at userIsOwner (/home/kequc/.linuxbrew/lib/node_modules/generate-node/node_modules/common-questions/index.js:172:28)
    at projectOwner (/home/kequc/.linuxbrew/lib/node_modules/generate-node/node_modules/common-questions/index.js:142:8)
    at Generate.<anonymous> (/home/kequc/.linuxbrew/lib/node_modules/generate-node/node_modules/common-questions/index.js:72:18)
    at Generate.use (/home/kequc/.linuxbrew/lib/node_modules/generate/node_modules/base-plugins/index.js:95:18)
    at Generate.plugin (/home/kequc/.linuxbrew/lib/node_modules/generate-node/node_modules/generate-defaults/index.js:17:7)
    at Generate.use (/home/kequc/.linuxbrew/lib/node_modules/generate/node_modules/base-plugins/index.js:95:18)

Hi @Kequc, thanks for the detailed information. It looks like some dependencies need to be bumped in this project so it pulls down the latest parse-git-config.

I'll try to get to this soon, but in the meantime, you could try generate-project to create a new node.js project.