Closed TheNotary closed 7 years ago
I've not seen this before. I suspect it's because you've installed it globally and should just be doing it locally.
npm install rpi-gpio
Thanks @JamesBarwell, it works without issue when installed locally and when node is run from the folder with the node_modules/
folder, this can be closed. Also, I'm noticing by setting the NODE_PATH variable, I can require in packages globally, my system was slightly misconfigured.
e.g.
export NPM_PACKAGES="$HOME/.npm-packages"
export PATH="$PATH:$HOME/.npm-packages/bin"
export NODE_PATH=/home/pi/.npm-packages/lib/node_modules:$NODE_PATH
I'm probably overlooking something obvious, but I can't seem to get this code working. Is there a naming issue I'm not seeing?
Installing:
Using: