I try to work with GPIO with nodejs function but got warning:
Warning: The pigpio C library can't be loaded on this machine and any
attempt to use it will fail.
Error: "Module did not self-register"
If you are working on a Raspberry Pi and see a "Module did not self-
register" error, this typically indicates that the installation
instructions were not exactly followed. For further details see the
installation section of the readme at
https://github.com/fivdi/pigpio#installation
Note that step 1 of the installation instructions must be completed
before step 2.
and errror:
Invoking require('bindings')('pigpio.node') resulted in the following error:
Error: /snap/core/current/lib/aarch64-linux-gnu/libc.so.6: version `GLIBC_2.27' not
found (required by /usr/local/lib/libpigpio.so.1)
at Object.Module._extensions..node (internal/modules/cjs/loader.js:1144:18)
at Module.load (internal/modules/cjs/loader.js:950:32)
at Function.Module._load (internal/modules/cjs/loader.js:790:12)
at Module.require (internal/modules/cjs/loader.js:974:19)
at require (internal/modules/cjs/helpers.js:101:18)
at bindings (/home/pi/GIT/node/hello/node_modules/bindings/bindings.js:112:48)
at /home/pi/GIT/node/hello/node_modules/pigpio/pigpio.js:8:31
at Object.<anonymous> (/home/pi/GIT/node/hello/node_modules/pigpio/pigpio.js:43:3)
at Module._compile (internal/modules/cjs/loader.js:1085:14)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1114:10)
my node version and location are:
v14.20.1
/snap/bin/nodenode
pigpiod:
79
/usr/local/bin/pigpiod
npm pigpio version from package-lock.json
"pigpio": {
"version": "3.3.1",
"resolved": "https://registry.npmjs.org/pigpio/-/pigpio-3.3.1.tgz",
"integrity": "sha512-z7J55K14IwWkA+oW5JHzWcgwThFAuJ7IzV3A2//yRm4jJ2DTU0DHIy91DB0siOi12rvvlrIhRetEuAo0ztF/vQ==",
"requires": {
"bindings": "^1.5.0",
"nan": "^2.14.2"
}
},
Does node not see pigpiod installed on the machine?