Skip to main content
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

Implementing Tables in Sanity Studio

Rich text editors often lack built-in table support and Sanity Studio's Portable Text editor is no exception. However, with the right approach, you can add full table functionality including paste...

Fixing a Dead Roborock S6 Charging Unit

My Roborock S6 suddenly stopped charging. No LED on the dock, no life signs. Naturally, first thought: power brick or cable. But those were fine, the issue was inside the dock itself. After cracki...