Skip to content

Invariant Violation: Failed to publish: the publish script exited. #47

Answered by leo-petrucci
leo-petrucci asked this question in Q&A
Discussion options

You must be logged in to vote

It just dawned on me that I have no reason to use yarn to publish the package and that I can just use npm publish to send the package to NPM.

So I ended up doing that and it worked really easily. I think yarn 2 might've changes some stuff in regards to the publish command so it might be worthy of investigation. Two things I noticed:

  • It complained about using --new-version
  • Once I removed it running yarn npm publish started failing with a 404 error, even though I've used the exact command before to publish it locally

Either way, Release now runs fine, so all good! Thank you for help and sorry for wasting your time!

Replies: 2 comments 10 replies

Comment options

You must be logged in to vote
7 replies
@kettanaito
Comment options

@leo-petrucci
Comment options

@kettanaito
Comment options

@leo-petrucci
Comment options

@kettanaito
Comment options

Comment options

You must be logged in to vote
3 replies
@kettanaito
Comment options

@leo-petrucci
Comment options

@kettanaito
Comment options

Answer selected by leo-petrucci
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants