/personal

Synology Node and Zlib issue

Synology Node and Zlib issue

Recently I’ve stumbled upon an issue with Node.JS on my Synology. I had Node 8 installed as a dependency by some other package, it was ok for running my Albert Heijn script.

However, Synology Application Service autoupdated itself and the new version has Node 12 as a dependency. Not an issue, if the Zlib wasn’t that outdated. That triggers this error whenever you want to install any package:

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

However, apparently Synology manages the Node installations with nvm and with that you can change the active version pretty easily. If you haven’t used nvm up until now, just log in via ssh to your NAS and run sudo nvm. You will be presented with the installed versions and you can just select another one, 8 in my case. That switched the used version to 8 and installing stuff was working again.

Tags: personalsynology

Mihai Blaga

Mihai Blaga