jperkin / node-rpio

Raspberry Pi GPIO library for node.js
856 stars 123 forks source link

Bindings.js Error #167

Closed plezhh closed 1 year ago

plezhh commented 1 year ago

Hello,

I have an application with two folders, backend and src, with individuals node_modules folder.

If I require the rpio library in backend all works good.

If I try to require it in src, with npm run build && npm start, I get a blank white page, with the following errors in console:

image

Could you help me with some ideas?

Thanks!

plhyhc commented 1 year ago

The rpio library is designed to be used on the backend only. For use with the GPIO pins. The frontend which loads into a web browser does not have access to a the GPIO pins. If you want to connect the frontend to the backend, the best way to do this is by an Ajax requests to a backend method that handles the GPIO I/O.

plezhh commented 1 year ago

Ohhh, so that's the problem. Thank you very much!