nebrius / raspi-pwm

Provides access to PWM on the Raspberry Pi from Node.js
MIT License
26 stars 4 forks source link

Error: The module ... was compiled against a different #6

Closed distancerunner closed 3 years ago

distancerunner commented 3 years ago

When I running sudo npm start the server won't start because of:

Error: The module '/home/pi/Downloads/websockets/app/node_modules/pigpio/build/Release/pigpio.node'
was compiled against a different Node.js version using
NODE_MODULE_VERSION 83. This version of Node.js requires
NODE_MODULE_VERSION 64. Please try re-compiling or re-installing

I tried a lot of things, but only working was: sudo npm rebuild pigpio --update-binary

npm rebuild and npm install was not working

I found out, there is a "mess" in the linux with node version. In user and superuser existing different version: node -v sudo node -v

Hope it helps anybody else.