Closed emilsjolander closed 5 years ago
Re-wrote example slightly to use https://github.com/npm/libnpmpublish instead and getting very similar error. So assuming not a direct issue with this package but maybe rather with the data I'm passing in. However the data passed in very closely matches unit tests provided in this package.
Ok finally figured out the issue! I had only created a tarball but the registry expects a gziped tarball! Using Zlib to gzip the stream solved my issue
thanks, I reoslve my problem since I find this Issue;
let gzip = zlib.createGzip(); body: fs.createReadStream(bodyPath).pipe(gzip);
I'm unable to publish a trivial node package due to
Error: incorrect header check : @emilsj/publish-test
. I've reduced it to a minimal example below (but ofc redacted my auth token). I've also tried updating the registry url to point to the full resource instead of the base registry url which still gives an error but this time results in a 404.The code is modeled as closely as possible after the unit tests in this repo.
full error
package.json
index.js