Synology Node and Zlib issue

Cover Image for 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.

More Stories

Cover Image for When Your UPS Isn’t Actually USB: Fixing a Larice 3 KVA on Unraid

When Your UPS Isn’t Actually USB: Fixing a Larice 3 KVA on Unraid

The problem My “USB-connected” Larice 3 KVA UPS refused to show up in Unraid. I plugged the printer-style cable in, expected it to pop up in lsusb, and …nothing. No logs, no enumeration, nothing. ...

Mihai Blaga's profile picture
Mihai Blaga
Cover Image for Software Development and General Aviation

Software Development and General Aviation

Software development and general aviation seem like completely different worlds. One is about writing logic, the other about defying gravity. But when you break them down they both involve managin...

Mihai Blaga's profile picture
Mihai Blaga