Repository navigation
Description
Affected Packages
pkg:@changesets/changelog-github
Problem
pnpx changeset version command is giving following error:
The following error was encountered while generating changelog entries
We have escaped applying the changesets, and no files should have been affected
🦋 error TypeError: Cannot read properties of null (reading 'author')
🦋 error at Object.getInfo (project-name\node_modules\.pnpm\@[email protected]\node_modules\@changesets\get-github-info\dist\get-github-info.cjs.dev.js:228:12)
🦋 error at processTicksAndRejections (node:internal/process/task_queues:96:5)
🦋 error at async project-name\node_modules\.pnpm\@[email protected]\node_modules\@changesets\changelog-github\dist\changelog-github.cjs.dev.js:122:13
🦋 error at async Object.getReleaseLine (project-name\node_modules\.pnpm\@[email protected]\node_modules\@changesets\changelog-github\dist\changelog-github.cjs.dev.js:99:19)
🦋 error at async Promise.all (index 0)
🦋 error at async generateChangesForVersionTypeMarkdown (project-name\node_modules\.pnpm\@[email protected]\node_modules\@changesets\apply-release-plan\dist\apply-release-plan.cjs.dev.js:188:22)
🦋 error at async getChangelogEntry (project-name\node_modules\.pnpm\@[email protected]\node_modules\@changesets\apply-release-plan\dist\apply-release-plan.cjs.dev.js:243:109)
🦋 error at async project-name\node_modules\.pnpm\@[email protected]\node_modules\@changesets\apply-release-plan\dist\apply-release-plan.cjs.dev.js:392:21
🦋 error at async Promise.all (index 0)
🦋 error at async Object.applyReleasePlan [as default] (project-name\node_modules\.pnpm\@[email protected]\node_modules\@changesets\apply-release-plan\dist\apply-release-plan.cjs.dev.js:287:31)
ELIFECYCLE Command failed with exit code 1.
- The
authorfield is present in all package.json files. GITHUB_TOKENis also set as env variable with Github PAT with bothread:userandrepo:statuspermissions.- config file:
{ "$schema": "https://unpkg.com/@changesets/[email protected]/schema.json", "changelog": ["@changesets/changelog-github", { "repo": "another-dev/project-name" }], "commit": false, "fixed": [], "linked": [], "access": "restricted", "baseBranch": "main", "updateInternalDependencies": "patch", "ignore": [] }
- tested
v0.4.4andv0.4.3both giving same error. - System is windows 10 and node v16.14.2
pnpx changesetis working fine
Reacted by johnshift, Will Shown, Ryandi, Matt Ramirez, Stefan Åstrand, xiaomu, Alexandre Bonhomme, Dhiraj Arun, Ice, Yun Feng and 7 more
Metadata
Metadata
Assignees
Labels
No labels
Activity
unitario commentedon Jun 6, 2022
Push your commits to origin.
clementcreusat commentedon Dec 12, 2022
Thanks, same error, @unitario your comment helped ;)
grempe commentedon Dec 12, 2022
Same issue. Pushed all commits to origin.
I am using a Turborepo monorepo setup and attempting to to my first changeset snapshot.
dhirajarun commentedon Dec 25, 2022
Hey @grempe did you find any solution?
stormwarning commentedon Mar 6, 2023
FWIW, just encountered the same error when the changesets action tried to run. Patching get-github-info with some
console.log()s showed that the data for a particular squash commit wasnull(while data for a subsequent squash was retrieved just fine).Reverting the offending commit unblocked the workflow and recreating and merging the reverted PR seems to have worked fine. Literally the only difference I can find is that there was an extra space in the initial commit title before the PR number:
Not sure if that's a red herring or not, but hopefully this helps someone
gr2m commentedon May 31, 2023
I'm running into the same error and none of the suggestions helped. I deleted the whole repository reset the whole git history. The same error still occurs.
@stormwarning How did you add the patches? Did you manage to run the command locally somehow?
Update: nevermind, I was able to reproduce the error by running
node_modules/@changesets/cli/bin.js versionlocally. In my case the problem was an incorrect configuration.changelog[1].repowas set to the incorrect repository, which is why the commit could not be found.cseas commentedon Jun 4, 2023
Thanks! This was the case for me as well as I copied the config from another project and forgot to update the repo value. The error message is very misleading in identifying this.
toakleaf commentedon Jul 11, 2023
If you're running into this the underlying issue is that the permissions needed are more broad than those specified here. It says you only need
repo:statusandread:user, but I had to broaden the permissions to include everything underrepoto get it working.kandji-joe commentedon Jul 28, 2023
After updating my token to include everything under
repoit appears to be working now 👍alex-page commentedon Apr 2, 2024
The error message should be handled differently when the repo in the
config.jsoncannot be found. The current error is quite confusing.Seolhun commentedon Sep 10, 2024
I originally set up my repository to use the GitHub private registry, but recently I switched to npm.
This change affected my changeset command, particularly in the following line from
config.json:I deleted this line, It was reolsved.
But, I'm not sure it is good solution.
MikeHewett commentedon Aug 21, 2025
@Seolhun I did a similar thing recently and had to remove this plugin. I think its correct in our scenarios as we're not relying on github to generate changelogs but another method.
Your guidance helped me out, cheers.