I created a package for spotting most publish-related errors (and more) during testing:
https://github.com/zkochan/package-preview
Basically, it achieves the same results as publishing to veraccio and installing from there.
Though, package-preview spots even more issues because it uses pnpm for installation, which is a strict package manager. Code won't work if it relies on packages that are not referenced in package.json