-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
ZlibError when calling publish #2278
Comments
We're gonna attempt updating our environment to the latest versions of everything to see if that fixes the problem but any help would be appreciated. I wonder if the use of a proxy registry is the problem? If so how could we fix that? |
Upgrade to Mojave and upgraded Node to the latest version and it worked fine. |
I have a similar issue, reported first here: isaacs/minizlib#8 Not reproducable locally on ubuntu 18.04 and node v 8.1* or ubuntu bash with windows wsl, same node and npm version 6.5.0. Using latest lerna in build. node@10.16.0 cc @evocateur FYI |
Just got this error on osx with that latest version of node... relevant parts of the error log:
|
I got this today as well on osx, node 10.16.3, lerna 3.20.2.
Downgrading to lerna 3.18.4 allowed me to publish successfully. |
Got this again today, 3.22.0: lerna info git Pushing tags...
lerna WARN gitPush fatal: the receiving end does not support --atomic push
lerna WARN gitPush fatal: the remote end hung up unexpectedly
lerna WARN gitPush error: failed to push some refs to 'https://dev.azure.com/if-it/If%20Design%20Hub/_git/guybrush'
lerna WARN gitPush
lerna info gitPush --atomic failed, attempting non-atomic push
lerna info publish Publishing packages to npm...
lerna notice Skipping all user and access validation due to third-party registry
lerna notice Make sure you're authenticated properly ¯\_(ツ)_/¯
lerna ERR! ZlibError: zlib: invalid distance too far back
lerna ERR! at Unzip.<anonymous> (/home/vsts/work/1/s/node_modules/minizlib/index.js:73:52)
lerna ERR! at Unzip.emit (events.js:327:22)
lerna ERR! at Zlib.zlibOnError [as onerror] (zlib.js:183:8)
lerna ERR! at Zlib.writeSync (<anonymous>)
lerna ERR! at processChunkSync (zlib.js:426:12)
lerna ERR! at Unzip.ZlibBase._processChunk (zlib.js:401:12)
lerna ERR! at Unzip.write (/home/vsts/work/1/s/node_modules/minizlib/index.js:140:30)
lerna ERR! at Object.write (/home/vsts/work/1/s/node_modules/@lerna/get-packed/node_modules/tar/lib/parse.js:305:58)
lerna ERR! at Yallist.<anonymous> (/home/vsts/work/1/s/node_modules/minipass/index.js:374:18)
lerna ERR! at Yallist.forEach (/home/vsts/work/1/s/node_modules/minipass/node_modules/yallist/yallist.js:156:8)
lerna ERR! at ReadStream.emit (/home/vsts/work/1/s/node_modules/minipass/index.js:373:20)
lerna ERR! at ReadStream.emit (/home/vsts/work/1/s/node_modules/fs-minipass/index.js:154:22)
lerna ERR! at ReadStream.write (/home/vsts/work/1/s/node_modules/minipass/index.js:163:17)
lerna ERR! at ReadStream.[_handleChunk] (/home/vsts/work/1/s/node_modules/fs-minipass/index.js:131:19)
lerna ERR! at ReadStream.[_onread] (/home/vsts/work/1/s/node_modules/fs-minipass/index.js:109:32)
lerna ERR! lerna zlib: invalid distance too far back
|
@phun-ky apologies for the late response. I had seen this issue before when searching for similar problems since upgrading from Lerna v2 to v3, and I actually managed to solve it but forgot to reply here. If you're using Yarn, then add this as a Yarn resolution to your root {
"resolutions": {
"npm-packlist": "1.1.12"
}
} The way I found this was we were using Another thing you can do is defer npx lerna version --no-push --yes
npx lerna publish from-git --yes
# See https://github.com/lerna/lerna/blob/ea6ec639560ce71d9df8cbd7eef2d416e71f5442/commands/version/lib/git-push.js#L11
git push --follow-tags --no-verify origin master |
The above worked for us just now. Thank you @NMinhNguyen 🙏 |
Very often running into the "Publish & Install" CI flow failing due to the error: ``` lerna ERR! ZlibError: zlib: invalid block type ``` Research brought me to lerna/lerna#2278 (comment), so I am now attempting to implement this fix to see if it solves the random failures.
I'm using NPM not Yarn, but publishing before pushing upstream worked for me. Thanks @NMinhNguyen! |
I ran into the same failure as @tylerlevine, using lerna 4.0.0 and node 14.17.0 on our CI. I have not been able to reproduce it on my mac locally. I did what @NMinhNguyen suggested, putting This issue is closed, but I don't feel like pinning down a lower version of |
@tbergquist-godaddy @NMinhNguyen getting a similar issue now with lerna 4, node 16 and npm 8: |
@phun-ky did you ever solve this lerna error? if so, can you please share |
We separated the versioning and publishing task in our ci to `lerna version` and `lerna publish` (with required parameters), and it solved it self.
|
When we're trying to publish our packages we are getting the error:
Expected Behavior
It should publish the packages with no errors.
Current Behavior
It updates all the packages.json versions but DOES NOT publish them to the registry.
Possible Solution
Unknown?
Steps to Reproduce (for bugs)
Call
npx lerna publish
Your Environment
Mac OS El Capitan 10.11.5
NPM version: 5.6.0
Node version: 9.2.1
Lerna version: 3.16.4
This is the full output of the log when we call
npx lerna publish --loglevel verbose
The text was updated successfully, but these errors were encountered: