choojs/bankai

TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string

chrisdwheatley opened this issue ยท 2 comments

This is a ๐Ÿ› bug report ๐Ÿ˜ข, the bug seems to have been introduced in 9.6.0.

Expected Behavior

When using create-choo-app I'm expecting npm start to work.

Current Behavior

npm start fails with an error from bankai.

Possible Solution

I've debugged the code a little, it looks like handler.dirname https://github.com/choojs/bankai/blob/master/lib/cmd-start.js#L12 might be undefined.

I've haven't had chance to investigate further but what'd be really cool is if someone want to debug with me to give me some understanding of how bankai works.

Context

From what I can tell this affects everyone who runs create-choo-app. To workaround the issue I've downgraded to 9.5.0 which works.

Code Sample

Stack trace:

TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string
    at assertPath (path.js:28:11)
    at Object.join (path.js:1249:7)
    at iterator (/node_modules/findup/index.js:31:28)
    at FindUp._find (/node_modules/findup/index.js:60:3)
    at new FindUp (/node_modules/findup/index.js:53:8)
    at FindUp (/node_modules/findup/index.js:15:12)
    at module.exports (/node_modules/findup/index.js:10:10)
    at isElectronProject (/node_modules/bankai/lib/is-electron-project.js:10:3)
    at start (/node_modules/bankai/lib/cmd-start.js:12:3)
    at main (/node_modules/bankai/bin.js:91:31)

Your Environment

Software Version(s)
Package bankai 9.6.0
Runtime nodejs 9.2.0
Package Manager npm 5.5.1
Operating System macOS 10.11.3

Yes I confirmed that with a new npx create-choo-app also just now.

๐Ÿ“ฆ 9.6.1