I am trying to import a node module in node 12.22.5
const Gpio = require('pigpio').Gpio;
But I get an error telling me that require is not defined
I am trying to import a node module in node 12.22.5
const Gpio = require('pigpio').Gpio;
But I get an error telling me that require is not defined
For Raspberry Pi, you first need to install the module, then you can use it:
npm install pigpio