Looking at issues with building the package from CI

- Building the npm package from outside of its root directory seems to fix some things (though not others).
- There was an error in the postpublish error handling, which was masking other errors along the way.