bitfocus / companion-module-raspberry-gpio

MIT License
5 stars 0 forks source link

Error loading module: Error: Cannot find module 'onoff' #6

Closed mattrog closed 3 months ago

mattrog commented 2 years ago

Thanks to some awesome help on the PI channel in slack - I have managed to get this module onto my Pi

But every time I try to add an instance I get this error:

21.11.08 13:45:00 module(raspberry-gpio): Error loading module: Error: Cannot find module 'onoff' Require stack: - /usr/local/src/companion/module-local-dev/companion-module-raspberry-gpio/index.js - /usr/local/src/companion/lib/instance.js - /usr/local/src/companion/app.js - /usr/local/src/companion/headless_ip.js

Running 2.2.0 (2.2.0-eb63b01f-3583)

Any ideas .....?

For ref I have done:

  1. sudo systemctl stop companion
  2. cd /usr/local/src/companion/module-local-dev
  3. sudo git clone https://github.com/bitfocus/companion-module-raspberry-gpio
  4. cd ..
  5. sudo nano yarn.lock (file edit details here:https://github.com/bitfocus/companion/issues/1778)
  6. sudo yarn install
  7. sudo companion-update
  8. sudo reboot
mattrog commented 2 years ago

Ok - So I have updated NVM, installed onoff, run companion update and I can now add the module without the timeout and error as above !! However ... I now get the following error instance(RPi GPIO): GPIO is inaccessible