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 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 managing co...

Mihai Blaga's profile picture
Mihai Blaga
Cover Image for LottieFiles downloader

LottieFiles downloader

Today I needed a cool animation for a small website project, and, as usual, I headed over to LottieFiles to grab one. It’s not something I do often, maybe once every few months. But to my surprise, I ...

Mihai Blaga's profile picture
Mihai Blaga