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

[npm][flake] You cannot publish over the previously published versions #213

Open
ianlewis opened this issue Jun 12, 2023 · 1 comment
Open
Labels
bug Something isn't working

Comments

@ianlewis
Copy link
Member

Sometimes the local package.json version gets out of sync with the published versions.

npm verb stack HttpErrorGeneral: 403 Forbidden - PUT https://registry.npmjs.org/@slsa-framework%2fe2e-nodejs-push-main-disttag-slsa3 - You cannot publish over the previously published versions: 0.0.11.

I'm not sure how this happens because the package.json should be updated and pushed prior to the workflow that publishes the package being run. So even if there is an error in the workflow the version should be correct. Perhaps the old version is being rebased back on somehow?

@ianlewis ianlewis added the bug Something isn't working label Jun 12, 2023
@ianlewis
Copy link
Member Author

ianlewis commented Jul 11, 2023

Sometimes the tag push is accepted but the branch push is rejected because of a concurrent change and so the change to update the package.json gets lost.

https://github.com/slsa-framework/example-package/actions/runs/5441182527/jobs/9894851760

To https://github.com/slsa-framework/example-package.git
 * [new tag]           v36.0.92 -> v36.0.92
 ! [rejected]          main -> main (fetch first)
error: failed to push some refs to 'https://github.com/slsa-framework/example-package.git'
hint: Updates were rejected because the remote contains work that you do
hint: not have locally. This is usually caused by another repository pushing
hint: to the same ref. You may want to first integrate the remote changes
hint: (e.g., 'git pull ...') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant