zlib: invalid distance too far back

What I Wanted to Do

Run “npm update”

What Happened Instead

nobody@5efac8001040:/fresnel$ npm update
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! /cache/_logs/2019-02-21T16_14_08_030Z-debug.log
nobody@5efac8001040:/fresnel$ npm update
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! /cache/_logs/2019-02-21T16_40_46_074Z-debug.log

Reproduction Steps

  1. Clone https://github.com/wikimedia/fresnel
  2. Checkout 235abec (same as master as of writing)
  3. Run “npm update”

This is with Node.js v10.4.0, and npm 6.5.0, on Debian Linux 9 (Stretch).

To get my exact environment, use:

$ git clone https://github.com/wikimedia/fresnel.git
$ git checkout 235abec
$ docker run --rm -i -t -v /"$PWD"://src -e 'HOME=/tmp' --entrypoint /bin/sh docker-registry.wikimedia.org/releng/node10-test-browser:0.3.3 -c "cd /src/;bash"
$ npm update

Details

debug.log (11.6 KB)

Platform Info

$ npm versions
{ fresnel: '0.1.1',
  npm: '6.5.0',
  ares: '1.14.0',
  cldr: '29.0',
  http_parser: '2.8.1',
  icu: '57.1',
  modules: '64',
  napi: '3',
  nghttp2: '1.29.0',
  node: '10.4.0',
  openssl: '1.1.0f',
  tz: '2016b',
  unicode: '8.0',
  uv: '1.20.3',
  v8: '6.7.288.43-node.7',
  zlib: '1.2.8' }

$ node -p process.platform
linux

See also:

Upgrade your zlib. On Debian (testing as of now), zlib1g 1.2.8 exhibited the problem. Updating to zlib1g fixed it.

1 Like

@Smurf Thanks, that’s interesting. Which version of zlib1g did you update to?

I don’t think upgrading zlib is a feasible solution, though. It would appear this effectively means that Node.js and npm do not support the current stable version of Debian Linux. Seems like a pretty serious problem?

If Debian’s version of zlib cannot be supported with a workaround, perhaps npm should touch base with Debian about this and push for a fix. As of writing, Debian Linux is advertised as a supported platform by both Node and npm.

You misunderstand. The upgraded zlib is already in Debian. It’s just a matter of tightening up Node’s and/or npm’s dependency on it.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.