Open oligriffiths opened 3 years ago
It relies on the C++ PiGPIO, which depends on system libraries only available on the Raspberry Pi.
You can get around this with npm install --force
, however if you try and run the code it will crash on startup, and will likely also error out while trying to install.
Thanks, I only want to checkout the code on my local machine and not run it. So long as it doesn't require any libraries on the pi to actually install then the --force
command should work.
Testing this with yarn install --force
doesn't work however, do you know if it's a different command for yarn?
So long as it doesn't require any libraries on the pi to actually install then the
--force
command should work.
IIRC the pigpio npm module needs to compile the pigpio C++ library on install, so I think it actually does require these libraries on install.
Testing this with yarn install --force doesn't work however, do you know if it's a different command for yarn?
No idea I'm afraid.
Ah, is this why the PI needs to be rebooted after install? Because it does some kind of out-of-band install on the device?
Ah, is this why the PI needs to be rebooted after install? Because it does some kind of out-of-band install on the device?
That's one of a couple of reasons. It also makes a few system configuration changes as well to /boot
. It only needs to reboot if this is the first time installing it on the device.
Gotcha. I'm just writing some initial setup instructions and wanted to see if I could get this package committed to the repo to make things easier, but it sounds like it needs to be setup on the device to ensure these out-of-band changes are made, unless there is some script that can be run to do this...
Gotcha. I'm just writing some initial setup instructions and wanted to see if I could get this package committed to the repo to make things easier, but it sounds like it needs to be setup on the device to ensure these out-of-band changes are made, unless there is some script that can be run to do this...
Yes, it has to be installed via npm/yarn on the device. Generally speaking, it's bad practice to commit node_modules
to a repo anyways, especially when native modules are in play (as is the case here) cause they may end up being built for the wrong target/architecture (different Pis have different targets/architectures, so a binary built for one won't necessarily run on another)
Generally speaking, it's bad practice to commit node_modules to a repo anyways
yeah I know, I just like to do that for packages marked as not maintained in case they go away in the future.
Generally speaking, it's bad practice to commit node_modules to a repo anyways
yeah I know, I just like to do that for packages marked as not maintained in case they go away in the future.
FWIW, packages older than 72 hours can't be deleted from npm
Oh, good to know, thank you.
IIRC the pigpio npm module needs to compile the pigpio C++ library on install, so I think it actually does require these libraries on install.
It should be possible to install the pigpio npm module successfully on any machine that supports Node.js. For example, here is what I see when I install it on an Intel based Linux machine:
$ node -v
v16.9.1
$ npm i pigpio
added 4 packages, and audited 5 packages in 8s
found 0 vulnerabilities
$
The pigpio npm module doesn't compile the pigpio C library on install. The binaries generated when the pigpio npm module is installed on a non-Pi machine will of course be completely and utterly useless at runtime. This "feature" was added to the pigpio npm module to enable developers to develop on non-Pi systems.
Hi
Can someone explain why this package has to be installed on the raspberry pi? I want to be able to commit the package to my git repo but can't install it on my macbook.
Thanks
Oli