You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
The "path" argument must be of type string. Received type undefined #734
I am having a problem in running the package with the latest fix release of 4.1.1. I receive The "path" argument must be of type string. Received type undefined error whenever I try to run the package. I am using yarn as a package manager
Steps to reproduce the issue
Run yarn git-cz
What's the expected result?
To run the command successfully
What's the actual result?
Error with The "path" argument must be of type string. Received type undefined (Image below)
Really sorry about this, I definitively need to work on some things in order for this not to happen again:
Setting up so that I always test the final version locally myself
Improving the tests so that they catch this
Understanding and documenting which code is part of the public api, and which aren't
I have a fix up at #735 which I'll merge as soon as the CI is green, which should be in a few minutes.
Again, sorry for the trouble this is causing!
A small follow up on why I didn't catch this when testing locally:
cz-conventional-changelog has a dependency on commitizen, so when I ran npm pack in my working copy of commitizen and then installed that in my test repo (npm install /path/to/pack.tar.gz) npm still kept another copy of commitizen installed in node_modules/cz-conventional-changelog/node_modules/commitizen. Since that copy was pulled from npm it wasn't using my local changes.
The simple fix for this is to rm -r node_modules/cz-conventional-changelog/node_modules/commitizen which will make cz-conventional-changelog use the version of commitizen that I installed from npm pack. Unfortunately I didn't notice this until now.
I really want to set up a test bench so that this can be done automatically. I know how to test it properly now, but it's very easy to miss, and it will be hard for new contributors to know.
I hope that this gives some understanding to how the broken build made it's way out, and what we are doing to fix this in the future.
So to recap, this is how to properly test it locally right now:
Pack your local version npm pack
Create an empty repo mkdir foo; cd foo; git init; echo {} > package.json
Install you packed version of commitizen: npm install /path/to/pack.tgz
Run the init command ./node_modules/.bin/commitizen init cz-conventional-changelog --save-dev --save-exact
Remove the extra commitizen rm -r node_modules/cz-conventional-changelog/node_modules/commitizen
Test a commit ./node_modules/.bin/git-cz
Reacted by Yassine Doghri, hdmr14, Alexander Kirilyuk, Tristan Hessell, Pedro Romano and Gavin King
Activity
Wentong-Liu commentedon May 5, 2020
same here.. can you guys please at least try for yourself and see if it's working before releasing a new version..
hdmr14 commentedon May 5, 2020
it caused by changing default value of configLoader.load on 6ef8afa.
related to #729
LinusU commentedon May 5, 2020
Really sorry about this, I definitively need to work on some things in order for this not to happen again:
I have a fix up at #735 which I'll merge as soon as the CI is green, which should be in a few minutes.
Again, sorry for the trouble this is causing!
A small follow up on why I didn't catch this when testing locally:
cz-conventional-changeloghas a dependency oncommitizen, so when I rannpm packin my working copy of commitizen and then installed that in my test repo (npm install /path/to/pack.tar.gz) npm still kept another copy of commitizen installed innode_modules/cz-conventional-changelog/node_modules/commitizen. Since that copy was pulled from npm it wasn't using my local changes.The simple fix for this is to
rm -r node_modules/cz-conventional-changelog/node_modules/commitizenwhich will makecz-conventional-changeloguse the version ofcommitizenthat I installed fromnpm pack. Unfortunately I didn't notice this until now.I really want to set up a test bench so that this can be done automatically. I know how to test it properly now, but it's very easy to miss, and it will be hard for new contributors to know.
I hope that this gives some understanding to how the broken build made it's way out, and what we are doing to fix this in the future.
So to recap, this is how to properly test it locally right now:
npm packmkdir foo; cd foo; git init; echo {} > package.jsonnpm install /path/to/pack.tgz./node_modules/.bin/commitizen init cz-conventional-changelog --save-dev --save-exactrm -r node_modules/cz-conventional-changelog/node_modules/commitizen./node_modules/.bin/git-czLinusU commentedon May 5, 2020
Released the fix as 4.1.2, I have also tested this version from npm and it works for me
Please let me know if there are any more troubles, and sorry for the broken builds!