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

TypeError: Cannot read property 'tag' of undefined #170

Closed
fohletex opened this issue Jun 17, 2020 · 2 comments
Closed

TypeError: Cannot read property 'tag' of undefined #170

fohletex opened this issue Jun 17, 2020 · 2 comments

Comments

@fohletex
Copy link

Hi!

Today I wanted to build a new library and use auto-changelog. In my package.json I referenced "^2.0.0". Npm installed the new version (2.1.0), which is at first no problem. I have this line in my version script of the pacakge.json: auto-changelog -p && git add CHANGELOG.md.

Running the commands as in the README, will break now my release chain:

$ auto-changelog -p
auto-changelog: 0 version tags found…

TypeError: Cannot read property 'tag' of undefined
    at parseReleases ([...]/node_modules/auto-changelog/src/releases.js:49:33)
    at run ([...]/node_modules/auto-changelog/src/run.js:99:26)

Investigating the code shows that there is an index problem: tags[0] is undefined.

Rolling back to "2.0.0" manually made the auto-changelog package run again, so it seems as if the bug was introduced with the recent version release.

@ahmadawais
Copy link

I have the same issue.

ERROR TypeError: Cannot read property 'tag' of undefined
    at parseReleases (/usr/local/lib/node_modules/auto-changelog/src/releases.js:49:33)
    at run (/usr/local/lib/node_modules/auto-changelog/src/run.js:99:26)

@cookpete
Copy link
Owner

cookpete commented Jul 3, 2020

This should be fixed in 2.2.0 for now. I need to tidy up all of the logic around parsing tags.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants