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

can't use git cz #35

Closed
silloy opened this issue Mar 12, 2020 · 8 comments
Closed

can't use git cz #35

silloy opened this issue Mar 12, 2020 · 8 comments
Labels

Comments

@silloy
Copy link

silloy commented Mar 12, 2020

macos catalina
npm 6.13.7
node 13.11.0

(node:6997) UnhandledPromiseRejectionWarning: TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received undefined
at validateString (internal/validators.js:120:11)
at Object.dirname (path.js:1128:5)
at /Users/zhao/.nvm/versions/node/v13.11.0/lib/node_modules/cz-emoji/index.js:45:55
at async loadConfig (/Users/zhao/.nvm/versions/node/v13.11.0/lib/node_modules/cz-emoji/index.js:50:31)
(node:6997) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:6997) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

@davafons
Copy link

I'm having the same error.

Until someone fixes it, installing the 1.1.2 version seems to work.

@DavidLambauer
Copy link

Having the same issue. Would be awesome if this is tackled soon

@davejtoews
Copy link

davejtoews commented Apr 20, 2020

Seeing the same problem. This was working on macOS Mojave. Problem appeared after upgrade to Catalina. I'm running both commitizen and cz-emoji as global installs.

Out of curiosity I added console.log(path) at line 45 of index.js. When I ran git cz, I still got the same error but the CLI prompts appeared and I was able to complete the commit.

@Duncan00
Copy link

Same here

@ngryman ngryman added the bug label May 30, 2020
@ngryman
Copy link
Owner

ngryman commented May 30, 2020

Hey guys,

I'm not exactly sure what is causing this error but I've made a couple of changes on master which should probably resolve it.

Could you give it a try by changing your cz-emoji version to point to the master branch?

-"cz-emoji": "1.2.1"
+"cz-emoji": "ngryman/cz-emoji#master"

If it resolves your issue, I'll release a new version. Thanks!

@davejtoews
Copy link

Thanks @ngryman. It seems to be working for me.

@wujekbogdan
Copy link

I'm having the same issue after upgrading to 1.3.0

git cz
[email protected], [email protected]

(node:2705) UnhandledPromiseRejectionWarning: TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be one of type string, Buffer, or URL. Received type undefined
    at readFile (fs.js:295:10)
    at internal/util.js:278:30
    at new Promise (<anonymous>)
    at readFile (internal/util.js:277:12)
    at loadConfig (/Users/wujekbogdan/htdocs/cm-web-app/node_modules/cz-emoji/index.js:16:10)
    at async getConfig (/Users/wujekbogdan/htdocs/cm-web-app/node_modules/cz-emoji/index.js:36:6)
(node:2705) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 2)
(node:2705) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

@ngryman
Copy link
Owner

ngryman commented Nov 10, 2020

@wujekbogdan Thanks for the catch!
This was a regression introduced in 1.3.0. It should now be fixed in 1.3.1.

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

7 participants