Comments (5)
Was onoff installed with one version of Node.js and used with a different version Node.js? If so, this isn't a good idea. In this case please reinstall onoff with npm install onoff
.
If the issue persists, please post the complete output of the following commands:
node -v
npm -v
cd
mkdir testonoff
cd testonoff
npm install onoff
from onoff.
Thanks!! for a quick response.
I tried re-installing onoff but the issue is not resolved.
> [email protected] install /home/pi/mytools/gateway/node_modules/onoff/node_modules/epoll
> node-gyp rebuild
make: Entering directory '/home/pi/mytools/gateway/node_modules/onoff/node_modules/epoll/build'
CXX(target) Release/obj.target/epoll/src/epoll.o
SOLINK_MODULE(target) Release/obj.target/epoll.node
SOLINK_MODULE(target) Release/obj.target/epoll.node: Finished
COPY Release/epoll.node
make: Leaving directory '/home/pi/mytools/gateway/node_modules/onoff/node_modules/epoll/build'
[email protected] node_modules/onoff
└── [email protected] ([email protected], [email protected])
Here is the output requested :
pi:/home/pi/mytools/test>node -v
v0.10.0
pi:/home/pi/mytools/test>npm -v
1.2.14
pi:/home/pi/mytools/test>npm install onoff
npm http GET https://registry.npmjs.org/onoff
npm http 304 https://registry.npmjs.org/onoff
npm http GET https://registry.npmjs.org/epoll
npm http 304 https://registry.npmjs.org/epoll
npm http GET https://registry.npmjs.org/bindings
npm http GET https://registry.npmjs.org/nan
npm http 304 https://registry.npmjs.org/bindings
npm http 304 https://registry.npmjs.org/nan
> [email protected] install /home/pi/mytools/test/node_modules/onoff/node_modules/epoll
> node-gyp rebuild
make: Entering directory '/home/pi/mytools/test/node_modules/onoff/node_modules/epoll/build'
CXX(target) Release/obj.target/epoll/src/epoll.o
SOLINK_MODULE(target) Release/obj.target/epoll.node
SOLINK_MODULE(target) Release/obj.target/epoll.node: Finished
COPY Release/epoll.node
make: Leaving directory '/home/pi/mytools/test/node_modules/onoff/node_modules/epoll/build'
[email protected] node_modules/onoff
└── [email protected] ([email protected], [email protected])
from onoff.
Node.js v0.10.0 and npm v1.2.14 are very very old! Where does this version of Node.js come from? I'm actually surprised that onoff appears to have installed successfully. Internally onoff depends on epoll which in turn depends on nan v2.1.x. nan v2.1.x supports Node.js 0.10.29+.
What's the output of the following commands?
cd /home/pi/mytools/test/node_modules/onoff/node_modules/epoll/test
./run-tests
Is there anything preventing you from using Node.js v4 or higher?
from onoff.
yep. node is old. This Pi has been running fine for a while so did not bother to update it.
Anyhow I installed new version of node and npm. Re-installed onoff. Everything good now!.
Thanks for your help. And great job with onoff.
cheers !
from onoff.
Thanks!
Have fun with onoff.
from onoff.
Related Issues (20)
- Problem using watch function with relay HOT 10
- Initialize GPIO without change pin status. HOT 6
- GPIO not working in a worker_thread - nodejs 14.15 HOT 2
- EACCES: permission denied, open '/sys/class/gpio/export' as superuser HOT 2
- Cannot run on non Rpi system HOT 1
- TypeError: writeSync is not a function HOT 4
- Raspberry Pi GPIO control in electron App HOT 8
- My computer does not have a /sys/class/gpio directory, but has /dev/gpiochip* HOT 1
- Interrupt misfire HOT 3
- Raspberry 4 - malloc(): corrupted top size HOT 3
- Error: EPERM: operation not permitted, write HOT 4
- Does not work with Compute Module 4. HOT 2
- Event is fired multiple times
- Superb library - I am running on Node v20 HOT 2
- Pi 5 Compatibility issues HOT 9
- Compatibility with ppp asked?
- RPI 5 gpio numbers HOT 2
- fs error HOT 8
- Newer version of epoll
- Button.watch spams endlessly HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from onoff.