0

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

laieman
  • 181
  • 1
  • 1
  • 8

1 Answers1

-1

For Raspberry Pi, you first need to install the module, then you can use it:

npm install pigpio
Tyler Selden
  • 281
  • 2
  • 14