Bug 1677710

Summary: rh-nodejs10 npm does not work against repository.
Product: Red Hat Software Collections Reporter: Piyush Bhoot <pbhoot>
Component: rh-nodejs10Assignee: Jan Staněk <jstanek>
Status: CLOSED CURRENTRELEASE QA Contact: BaseOS QE - Apps <qe-baseos-apps>
Severity: high Docs Contact:
Priority: high    
Version: rh-nodejs10CC: akhaitov, amike, baptiste.agasse, dbasant, hhorak, jon.dufresne, jorton, jstanek, skourdi, tborcin, zsvetlik
Target Milestone: ---   
Target Release: 3.4   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: rh-nodejs10-nodejs-10.10.0-3.el7 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1696153 (view as bug list) Environment:
Last Closed: 2019-06-19 08:26:37 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1678825    
Bug Blocks: 1696153, 1700625    
Attachments:
Description Flags
Upstream (zlib) fix none

Description Piyush Bhoot 2019-02-15 16:19:36 UTC
Description of problem:
rh-nodejs10 npm does not work against repository.

Version-Release number of selected component (if applicable):
node -v
v10.10.0

How reproducible:
Always


Steps to Reproduce:
1.scl enable rh-nodejs10 bash
2.npm info pm2


Actual results:
npm ERR! code Z_DATA_ERROR
npm ERR! errno -3
npm ERR! invalid distance too far back

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2019-02-15T16_04_13_921Z-debug.log

Expected results:
show pm2 info

Additional info:

Works as expected on rh-nodejs8 and rh-nodejs10 from nodesource

Comment 1 Jan Staněk 2019-02-19 13:37:17 UTC
This seems like the same issue the linked GH issue is facing -- namely a bug in older versions of zlib, which the npm from rh-nodejs10 seems to trigger. Also, running `npm info` against randomly selected npm packages revealed that this issue plagues pretty much any package from npm repository, not just pm2 and/or nodejs-ex.

I have managed to isolate the fix in the upstream codebase, applied it to the RHEL 7 version of zlib and managed to run the `npm info` successfully with that. The actual fix of this issue should then probably happen within the zlib package.

Comment 2 Jan Staněk 2019-02-19 13:38:33 UTC
Created attachment 1536332 [details]
Upstream (zlib) fix

Comment 4 Zuzana Svetlikova 2019-02-25 14:51:53 UTC
*** Bug 1663028 has been marked as a duplicate of this bug. ***