I'm trying out johnny-five on the Raspberry PI. It's a framework to build robots and since I'm a web developer per day, I should get along with JS. Anyway, you need to be up to date with node and npm, further than the packages you get delivered with your PI. Seems to work fine on a Raspberry PI 4, although there's no mention in the docs of it.
# make sure to be ready and fresh, here's how you update node sudo npm install -g n sudo n stable # the node package manager needs an update too sudo npm i npm@latest -g # search for outdated packages, while we're at it sudo npm outdated sudo npm update --save/--save-dev # grab the current git version and install it with npm git clone git://github.com/rwaldron/johnny-five.git && cd johnny-five sudo npm install # install raspi-io for access to your GPIOs sudo npm install raspi-io #run this to make an LED blink on pin P1-13 (GPIO27) sudo node eg/raspi-io.js