bpmurray / node-red-contrib-dht-sensor

Node-RED node to process DHT11/22 sensor data
Apache License 2.0
7 stars 8 forks source link

npm i node-red-contrib-dht-sensor fails on pi b (2011) lots of errors #1

Closed juggledad closed 9 years ago

juggledad commented 9 years ago

I installed bcm2835-1.42 (got 1 warning: configure: WARNING: Doxygen not found - continuing without Doxygen support) I installed node-dht-sensor - everything looks fine when I run 'npm i node-red-contrib-dht-sensor' I get

pi@p1-node ~ $ npm i node-red-contrib-dht-sensor \

node-dht-sensor@0.0.6 install /home/pi/node_modules/node-red-contrib-dht-sensor/node_modules/node-dht-sensor node-gyp rebuild

child_process: customFds option is deprecated, use stdio instead. make: Entering directory '/home/pi/node_modules/node-red-contrib-dht-sensor/nodemodules/node-dht-sensor/build' CXX(target) Release/obj.target/node-dht-sensor/node-dht-sensor.o ../node-dht-sensor.cpp:205:26: error: ‘Arguments’ does not name a type ../node-dht-sensor.cpp:205:37: error: ISO C++ forbids declaration of ‘args’ with no type [-fpermissive] /home/pi/.node-gyp/0.12.1/deps/v8/include/v8.h: In function ‘v8::Handlev8::Value Read(const int&)’: /home/pi/.node-gyp/0.12.1/deps/v8/include/v8.h:816:13: error: ‘v8::HandleScope::HandleScope()’ is protected ../node-dht-sensor.cpp:206:17: error: within this context ../node-dht-sensor.cpp:216:41: error: no matching function for call to ‘v8::Object::New()’ ../node-dht-sensor.cpp:216:41: note: candidate is: /home/pi/.node-gyp/0.12.1/deps/v8/include/v8.h:2388:24: note: static v8::Localv8::Object v8::Object::New(v8::Isolate) /home/pi/.node-gyp/0.12.1/deps/v8/include/v8.h:2388:24: note: candidate expects 1 argument, 0 provided ../node-dht-sensor.cpp:217:18: error: ‘NewSymbol’ is not a member of ‘v8::String’ ../node-dht-sensor.cpp:217:69: error: no matching function for call to ‘v8::Number::New(float&)’ ../node-dht-sensor.cpp:217:69: note: candidate is: /home/pi/.node-gyp/0.12.1/deps/v8/include/v8.h:1999:24: note: static v8::Localv8::Number v8::Number::New(v8::Isolate, double) /home/pi/.node-gyp/0.12.1/deps/v8/include/v8.h:1999:24: note: candidate expects 2 arguments, 1 provided ../node-dht-sensor.cpp:218:18: error: ‘NewSymbol’ is not a member of ‘v8::String’ ../node-dht-sensor.cpp:218:75: error: no matching function for call to ‘v8::Number::New(float&)’ ../node-dht-sensor.cpp:218:75: note: candidate is: /home/pi/.node-gyp/0.12.1/deps/v8/include/v8.h:1999:24: note: static v8::Localv8::Number v8::Number::New(v8::Isolate, double) /home/pi/.node-gyp/0.12.1/deps/v8/include/v8.h:1999:24: note: candidate expects 2 arguments, 1 provided ../node-dht-sensor.cpp:219:18: error: ‘NewSymbol’ is not a member of ‘v8::String’ ../node-dht-sensor.cpp:219:72: error: no matching function for call to ‘v8::Boolean::New(bool)’ ../node-dht-sensor.cpp:219:72: note: candidate is: /home/pi/.node-gyp/0.12.1/deps/v8/include/v8.h:6194:17: note: static v8::Handlev8::Boolean v8::Boolean::New(v8::Isolate, bool) /home/pi/.node-gyp/0.12.1/deps/v8/include/v8.h:6194:17: note: candidate expects 2 arguments, 1 provided ../node-dht-sensor.cpp:220:18: error: ‘NewSymbol’ is not a member of ‘v8::String’ ../node-dht-sensor.cpp:220:68: error: no matching function for call to ‘v8::Number::New(int)’ ../node-dht-sensor.cpp:220:68: note: candidate is: /home/pi/.node-gyp/0.12.1/deps/v8/include/v8.h:1999:24: note: static v8::Localv8::Number v8::Number::New(v8::Isolate, double) /home/pi/.node-gyp/0.12.1/deps/v8/include/v8.h:1999:24: note: candidate expects 2 arguments, 1 provided ../node-dht-sensor.cpp:221:18: error: ‘class v8::HandleScope’ has no member named ‘Close’ ../node-dht-sensor.cpp: At global scope: ../node-dht-sensor.cpp:224:30: error: ‘Arguments’ does not name a type ../node-dht-sensor.cpp:224:41: error: ISO C++ forbids declaration of ‘args’ with no type [-fpermissive] /home/pi/.node-gyp/0.12.1/deps/v8/include/v8.h: In function ‘v8::Handlev8::Value ReadSpec(const int&)’: /home/pi/.node-gyp/0.12.1/deps/v8/include/v8.h:816:13: error: ‘v8::HandleScope::HandleScope()’ is protected ../node-dht-sensor.cpp:225:17: error: within this context ../node-dht-sensor.cpp:227:14: error: request for member ‘Length’ in ‘args’, which is of non-class type ‘const int’ ../node-dht-sensor.cpp:228:44: error: ‘New’ is not a member of ‘v8::String’ ../node-dht-sensor.cpp:228:85: error: ‘ThrowException’ was not declared in this scope ../node-dht-sensor.cpp:229:21: error: ‘class v8::HandleScope’ has no member named ‘Close’ ../node-dht-sensor.cpp:229:37: error: too few arguments to function ‘v8::Handlev8::Primitive v8::Undefined(v8::Isolate)’ /home/pi/.node-gyp/0.12.1/deps/v8/include/v8.h:305:28: note: declared here ../node-dht-sensor.cpp:232:28: error: invalid types ‘const int[int]’ for array subscript ../node-dht-sensor.cpp:234:45: error: ‘New’ is not a member of ‘v8::String’ ../node-dht-sensor.cpp:234:94: error: ‘ThrowException’ was not declared in this scope ../node-dht-sensor.cpp:235:22: error: ‘class v8::HandleScope’ has no member named ‘Close’ ../node-dht-sensor.cpp:235:38: error: too few arguments to function ‘v8::Handlev8::Primitive v8::Undefined(v8::Isolate)’ /home/pi/.node-gyp/0.12.1/deps/v8/include/v8.h:305:28: note: declared here ../node-dht-sensor.cpp:241:49: error: ‘New’ is not a member of ‘v8::String’ ../node-dht-sensor.cpp:241:86: error: ‘ThrowException’ was not declared in this scope ../node-dht-sensor.cpp:242:26: error: ‘class v8::HandleScope’ has no member named ‘Close’ ../node-dht-sensor.cpp:242:42: error: too few arguments to function ‘v8::Handlev8::Primitive v8::Undefined(v8::Isolate)’ /home/pi/.node-gyp/0.12.1/deps/v8/include/v8.h:305:28: note: declared here ../node-dht-sensor.cpp:246:22: error: invalid types ‘const int[int]’ for array subscript ../node-dht-sensor.cpp:255:41: error: no matching function for call to ‘v8::Object::New()’ ../node-dht-sensor.cpp:255:41: note: candidate is: /home/pi/.node-gyp/0.12.1/deps/v8/include/v8.h:2388:24: note: static v8::Localv8::Object v8::Object::New(v8::Isolate) /home/pi/.node-gyp/0.12.1/deps/v8/include/v8.h:2388:24: note: candidate expects 1 argument, 0 provided ../node-dht-sensor.cpp:256:18: error: ‘NewSymbol’ is not a member of ‘v8::String’ ../node-dht-sensor.cpp:256:69: error: no matching function for call to ‘v8::Number::New(float&)’ ../node-dht-sensor.cpp:256:69: note: candidate is: /home/pi/.node-gyp/0.12.1/deps/v8/include/v8.h:1999:24: note: static v8::Localv8::Number v8::Number::New(v8::Isolate, double) /home/pi/.node-gyp/0.12.1/deps/v8/include/v8.h:1999:24: note: candidate expects 2 arguments, 1 provided ../node-dht-sensor.cpp:257:18: error: ‘NewSymbol’ is not a member of ‘v8::String’ ../node-dht-sensor.cpp:257:75: error: no matching function for call to ‘v8::Number::New(float&)’ ../node-dht-sensor.cpp:257:75: note: candidate is: /home/pi/.node-gyp/0.12.1/deps/v8/include/v8.h:1999:24: note: static v8::Localv8::Number v8::Number::New(v8::Isolate, double) /home/pi/.node-gyp/0.12.1/deps/v8/include/v8.h:1999:24: note: candidate expects 2 arguments, 1 provided ../node-dht-sensor.cpp:258:18: error: ‘NewSymbol’ is not a member of ‘v8::String’ ../node-dht-sensor.cpp:258:72: error: no matching function for call to ‘v8::Boolean::New(bool)’ ../node-dht-sensor.cpp:258:72: note: candidate is: /home/pi/.node-gyp/0.12.1/deps/v8/include/v8.h:6194:17: note: static v8::Handlev8::Boolean v8::Boolean::New(v8::Isolate, bool) /home/pi/.node-gyp/0.12.1/deps/v8/include/v8.h:6194:17: note: candidate expects 2 arguments, 1 provided ../node-dht-sensor.cpp:259:18: error: ‘NewSymbol’ is not a member of ‘v8::String’ ../node-dht-sensor.cpp:259:68: error: no matching function for call to ‘v8::Number::New(int)’ ../node-dht-sensor.cpp:259:68: note: candidate is: /home/pi/.node-gyp/0.12.1/deps/v8/include/v8.h:1999:24: note: static v8::Localv8::Number v8::Number::New(v8::Isolate, double) /home/pi/.node-gyp/0.12.1/deps/v8/include/v8.h:1999:24: note: candidate expects 2 arguments, 1 provided ../node-dht-sensor.cpp:260:18: error: ‘class v8::HandleScope’ has no member named ‘Close’ ../node-dht-sensor.cpp: At global scope: ../node-dht-sensor.cpp:263:32: error: ‘Arguments’ does not name a type ../node-dht-sensor.cpp:263:43: error: ISO C++ forbids declaration of ‘args’ with no type [-fpermissive] /home/pi/.node-gyp/0.12.1/deps/v8/include/v8.h: In function ‘v8::Handlev8::Value Initialize(const int&)’: /home/pi/.node-gyp/0.12.1/deps/v8/include/v8.h:816:13: error: ‘v8::HandleScope::HandleScope()’ is protected ../node-dht-sensor.cpp:264:17: error: within this context ../node-dht-sensor.cpp:266:14: error: request for member ‘Length’ in ‘args’, which is of non-class type ‘const int’ ../node-dht-sensor.cpp:267:45: error: ‘New’ is not a member of ‘v8::String’ ../node-dht-sensor.cpp:267:86: error: ‘ThrowException’ was not declared in this scope ../node-dht-sensor.cpp:268:22: error: ‘class v8::HandleScope’ has no member named ‘Close’ ../node-dht-sensor.cpp:268:38: error: too few arguments to function ‘v8::Handlev8::Primitive v8::Undefined(v8::Isolate)’ /home/pi/.node-gyp/0.12.1/deps/v8/include/v8.h:305:28: note: declared here ../node-dht-sensor.cpp:271:16: error: invalid types ‘const int[int]’ for array subscript ../node-dht-sensor.cpp:271:40: error: invalid types ‘const int[int]’ for array subscript ../node-dht-sensor.cpp:272:45: error: ‘New’ is not a member of ‘v8::String’ ../node-dht-sensor.cpp:272:76: error: ‘ThrowException’ was not declared in this scope ../node-dht-sensor.cpp:273:22: error: ‘class v8::HandleScope’ has no member named ‘Close’ ../node-dht-sensor.cpp:273:38: error: too few arguments to function ‘v8::Handlev8::Primitive v8::Undefined(v8::Isolate)’ /home/pi/.node-gyp/0.12.1/deps/v8/include/v8.h:305:28: note: declared here ../node-dht-sensor.cpp:276:28: error: invalid types ‘const int[int]’ for array subscript ../node-dht-sensor.cpp:278:45: error: ‘New’ is not a member of ‘v8::String’ ../node-dht-sensor.cpp:278:99: error: ‘ThrowException’ was not declared in this scope ../node-dht-sensor.cpp:279:22: error: ‘class v8::HandleScope’ has no member named ‘Close’ ../node-dht-sensor.cpp:279:38: error: too few arguments to function ‘v8::Handlev8::Primitive v8::Undefined(v8::Isolate)’ /home/pi/.node-gyp/0.12.1/deps/v8/include/v8.h:305:28: note: declared here ../node-dht-sensor.cpp:284:22: error: invalid types ‘const int[int]’ for array subscript ../node-dht-sensor.cpp:286:18: error: ‘class v8::HandleScope’ has no member named ‘Close’ ../node-dht-sensor.cpp:286:58: error: no matching function for call to ‘v8::Boolean::New(bool)’ ../node-dht-sensor.cpp:286:58: note: candidate is: /home/pi/.node-gyp/0.12.1/deps/v8/include/v8.h:6194:17: note: static v8::Handlev8::Boolean v8::Boolean::New(v8::Isolate, bool) /home/pi/.node-gyp/0.12.1/deps/v8/include/v8.h:6194:17: note: candidate expects 2 arguments, 1 provided ../node-dht-sensor.cpp: In function ‘void RegisterModule(v8::Handlev8::Object)’: ../node-dht-sensor.cpp:290:17: error: ‘NewSymbol’ is not a member of ‘v8::String’ ../node-dht-sensor.cpp:291:43: error: no matching function for call to ‘v8::FunctionTemplate::New(v8::Handlev8::Value (&)(const int&))’ ../node-dht-sensor.cpp:291:43: note: candidate is: /home/pi/.node-gyp/0.12.1/deps/v8/include/v8.h:3455:34: note: static v8::Localv8::FunctionTemplate v8::FunctionTemplate::New(v8::Isolate, v8::FunctionCallback, v8::Handlev8::Value, v8::Handlev8::Signature, int) /home/pi/.node-gyp/0.12.1/deps/v8/include/v8.h:3455:34: note: no known conversion for argument 1 from ‘v8::Handlev8::Value(const int&)’ to ‘v8::Isolate’ ../node-dht-sensor.cpp:292:17: error: ‘NewSymbol’ is not a member of ‘v8::String’ ../node-dht-sensor.cpp:293:47: error: no matching function for call to ‘v8::FunctionTemplate::New(v8::Handlev8::Value (&)(const int&))’ ../node-dht-sensor.cpp:293:47: note: candidate is: /home/pi/.node-gyp/0.12.1/deps/v8/include/v8.h:3455:34: note: static v8::Localv8::FunctionTemplate v8::FunctionTemplate::New(v8::Isolate, v8::FunctionCallback, v8::Handlev8::Value, v8::Handlev8::Signature, int) /home/pi/.node-gyp/0.12.1/deps/v8/include/v8.h:3455:34: note: no known conversion for argument 1 from ‘v8::Handlev8::Value(const int&)’ to ‘v8::Isolate’ ../node-dht-sensor.cpp:294:17: error: ‘NewSymbol’ is not a member of ‘v8::String’ ../node-dht-sensor.cpp:295:49: error: no matching function for call to ‘v8::FunctionTemplate::New(v8::Handlev8::Value (&)(const int&))’ ../node-dht-sensor.cpp:295:49: note: candidate is: /home/pi/.node-gyp/0.12.1/deps/v8/include/v8.h:3455:34: note: static v8::Localv8::FunctionTemplate v8::FunctionTemplate::New(v8::Isolate, v8::FunctionCallback, v8::Handlev8::Value, v8::Handlev8::Signature, int) /home/pi/.node-gyp/0.12.1/deps/v8/include/v8.h:3455:34: note: no known conversion for argument 1 from ‘v8::Handlev8::Value(const int&)’ to ‘v8::Isolate’ ../node-dht-sensor.cpp: In function ‘v8::Handlev8::Value Initialize(const int&)’: ../node-dht-sensor.cpp:287:1: warning: control reaches end of non-void function [-Wreturn-type] ../node-dht-sensor.cpp: In function ‘v8::Handlev8::Value ReadSpec(const int&)’: ../node-dht-sensor.cpp:261:1: warning: control reaches end of non-void function [-Wreturn-type] ../node-dht-sensor.cpp: In function ‘v8::Handlev8::Value Read(const int&)’: ../node-dht-sensor.cpp:222:1: warning: control reaches end of non-void function [-Wreturn-type] node-dht-sensor.target.mk:81: recipe for target 'Release/obj.target/node-dht-sensor/node-dht-sensor.o' failed make: _\ [Release/obj.target/node-dht-sensor/node-dht-sensor.o] Error 1 make: Leaving directory '/home/pi/node_modules/node-red-contrib-dht-sensor/node_modules/node-dht-sensor/build' gyp ERR! build error gyp ERR! stack Error: make failed with exit code: 2 gyp ERR! stack at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:267:23) gyp ERR! stack at ChildProcess.emit (events.js:110:17) gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:1067:12) gyp ERR! System Linux 3.18.11+ gyp ERR! command "node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" gyp ERR! cwd /home/pi/node_modules/node-red-contrib-dht-sensor/node_modules/node-dht-sensor gyp ERR! node -v v0.12.1 gyp ERR! node-gyp -v v1.0.2 gyp ERR! not ok npm ERR! Linux 3.18.11+ npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "i" "node-red-contrib-dht-sensor" npm ERR! node v0.12.1 npm ERR! npm v2.5.1 npm ERR! code ELIFECYCLE

npm ERR! node-dht-sensor@0.0.6 install: node-gyp rebuild npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the node-dht-sensor@0.0.6 install script 'node-gyp rebuild'. npm ERR! This is most likely a problem with the node-dht-sensor package, npm ERR! not with npm itself. npm ERR! Tell the author that this fails on your system: npm ERR! node-gyp rebuild npm ERR! You can get their info via: npm ERR! npm owner ls node-dht-sensor npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request: npm ERR! /home/pi/npm-debug.log


here is the npm-debug.log

0 info it worked if it ends with ok 1 verbose cli [ '/usr/local/bin/node', 1 verbose cli '/usr/local/bin/npm', 1 verbose cli 'i', 1 verbose cli 'node-red-contrib-dht-sensor' ] 2 info using npm@2.5.1 3 info using node@v0.12.1 4 verbose config Skipping project config: /home/pi/.npmrc. (matches userconfig) 5 silly cache add args [ 'node-red-contrib-dht-sensor', null ] 6 verbose cache add spec node-red-contrib-dht-sensor 7 silly cache add parsed spec { raw: 'node-red-contrib-dht-sensor', 7 silly cache add scope: null, 7 silly cache add name: 'node-red-contrib-dht-sensor', 7 silly cache add rawSpec: '', 7 silly cache add spec: '', 7 silly cache add type: 'range' } 8 verbose addNamed node-red-contrib-dht-sensor@ 9 silly addNamed semver.valid null 10 silly addNamed semver.validRange 11 silly addNameRange { name: 'node-red-contrib-dht-sensor', 11 silly addNameRange range: '', 11 silly addNameRange hasData: false } 12 silly mapToRegistry name node-red-contrib-dht-sensor 13 silly mapToRegistry using default registry 14 silly mapToRegistry registry https://registry.npmjs.org/ 15 silly mapToRegistry uri https://registry.npmjs.org/node-red-contrib-dht-sensor 16 verbose addNameRange registry:https://registry.npmjs.org/node-red-contrib-dht-sensor not in flight; fetching 17 verbose request uri https://registry.npmjs.org/node-red-contrib-dht-sensor 18 verbose request no auth needed 19 info attempt registry request try #1 at 09:51:41 20 verbose request id cf6eec436e16f8b6 21 verbose etag "2TO218WOCL31PFYP50U7ZPBVR" 22 http request GET https://registry.npmjs.org/node-red-contrib-dht-sensor 23 http 304 https://registry.npmjs.org/node-red-contrib-dht-sensor 24 silly get cb [ 304, 24 silly get { date: 'Thu, 11 Jun 2015 13:51:42 GMT', 24 silly get via: '1.1 varnish', 24 silly get 'cache-control': 'max-age=60', 24 silly get etag: '"2TO218WOCL31PFYP50U7ZPBVR"', 24 silly get age: '0', 24 silly get connection: 'keep-alive', 24 silly get 'x-served-by': 'cache-iad2145-IAD', 24 silly get 'x-cache': 'MISS', 24 silly get 'x-cache-hits': '0', 24 silly get 'x-timer': 'S1434030702.401821,VS0,VE352', 24 silly get vary: 'Accept' } ] 25 verbose etag https://registry.npmjs.org/node-red-contrib-dht-sensor from cache 26 verbose get saving node-red-contrib-dht-sensor to /home/pi/.npm/registry.npmjs.org/node-red-contrib-dht-sensor/.cache.json 27 silly addNameRange number 2 { name: 'node-red-contrib-dht-sensor', 27 silly addNameRange range: '', 27 silly addNameRange hasData: true } 28 silly addNameRange versions [ 'node-red-contrib-dht-sensor', 28 silly addNameRange [ '0.0.9', 28 silly addNameRange '0.0.10', 28 silly addNameRange '0.0.11', 28 silly addNameRange '0.0.12', 28 silly addNameRange '0.0.13', 28 silly addNameRange '0.0.14', 28 silly addNameRange '0.0.15', 28 silly addNameRange '0.0.16' ] ] 29 verbose addNamed node-red-contrib-dht-sensor@0.0.16 30 silly addNamed semver.valid 0.0.16 31 silly addNamed semver.validRange 0.0.16 32 silly cache afterAdd node-red-contrib-dht-sensor@0.0.16 33 verbose afterAdd /home/pi/.npm/node-red-contrib-dht-sensor/0.0.16/package/package.json not in flight; writing 34 verbose afterAdd /home/pi/.npm/node-red-contrib-dht-sensor/0.0.16/package/package.json written 35 silly install resolved [ { author: 35 silly install resolved { name: 'Brendan Murray', 35 silly install resolved email: 'brendanpmurray@gmail.com', 35 silly install resolved url: 'http://coolfore.com/' }, 35 silly install resolved name: 'node-red-contrib-dht-sensor', 35 silly install resolved version: '0.0.16', 35 silly install resolved description: 'Node-red node for node-dht-sensor', 35 silly install resolved dependencies: { 'node-dht-sensor': '0.0.6' }, 35 silly install resolved repository: 35 silly install resolved { type: 'git', 35 silly install resolved url: 'https://github.com/bpmurray/node-red-contrib-dht-sensor.git' }, 35 silly install resolved keywords: [ 'node-red', 'sensor', 'dht11', 'dht22' ], 35 silly install resolved license: 'Apache 2.0', 35 silly install resolved bugs: { url: 'https://github.com/bpmurray/node-red-contrib-dht-sensor/issues' }, 35 silly install resolved homepage: 'https://github.com/bpmurray/node-red-contrib-dht-sensor', 35 silly install resolved 'node-red': { nodes: [Object] }, 35 silly install resolved _id: 'node-red-contrib-dht-sensor@0.0.16', 35 silly install resolved _shasum: 'fba94c8f32b53f5b0001389f5a583a0d7acfe208', 35 silly install resolved _from: 'node-red-contrib-dht-sensor@', 35 silly install resolved _npmVersion: '1.4.28', 35 silly install resolved _npmUser: { name: 'bpmurray', email: 'brendanpmurray@gmail.com' }, 35 silly install resolved maintainers: [ [Object] ], 35 silly install resolved dist: 35 silly install resolved { shasum: 'fba94c8f32b53f5b0001389f5a583a0d7acfe208', 35 silly install resolved tarball: 'http://registry.npmjs.org/node-red-contrib-dht-sensor/-/node-red-contrib-dht-sensor-0.0.16.tgz' }, 35 silly install resolved directories: {}, 35 silly install resolved _resolved: 'https://registry.npmjs.org/node-red-contrib-dht-sensor/-/node-red-contrib-dht-sensor-0.0.16.tgz', 35 silly install resolved gitHead: '596925760c4c84efa1a7d97abe1c2a4ab6337855', 35 silly install resolved scripts: {}, 35 silly install resolved readme: 'ERROR: No README data found!' } ] 36 info install node-red-contrib-dht-sensor@0.0.16 into /home/pi 37 info installOne node-red-contrib-dht-sensor@0.0.16 38 verbose installOne of node-red-contrib-dht-sensor to /home/pi not in flight; installing 39 verbose lock using /home/pi/.npm/_locks/node-red-contrib-dht-sen-9e8dbece2600a36d.lock for /home/pi/node_modules/node-red-contrib-dht-sensor 40 silly install write writing node-red-contrib-dht-sensor 0.0.16 to /home/pi/node_modules/node-red-contrib-dht-sensor 41 silly cache addNamed cb node-red-contrib-dht-sensor@0.0.16 42 verbose unbuild node_modules/node-red-contrib-dht-sensor 43 verbose gentlyRm vacuuming /home/pi/node_modules/node-red-contrib-dht-sensor 44 verbose tar unpack /home/pi/.npm/node-red-contrib-dht-sensor/0.0.16/package.tgz 45 verbose tar unpacking to /home/pi/node_modules/node-red-contrib-dht-sensor 46 verbose gentlyRm vacuuming /home/pi/node_modules/node-red-contrib-dht-sensor 47 silly gunzTarPerm modes [ '755', '644' ] 48 silly gunzTarPerm extractEntry package.json 49 silly gunzTarPerm modified mode [ 'package.json', 438, 420 ] 50 silly gunzTarPerm extractEntry .npmignore 51 silly gunzTarPerm modified mode [ '.npmignore', 438, 420 ] 52 silly gunzTarPerm extractEntry README.md 53 silly gunzTarPerm modified mode [ 'README.md', 438, 420 ] 54 silly gunzTarPerm extractEntry LICENSE 55 silly gunzTarPerm modified mode [ 'LICENSE', 438, 420 ] 56 silly gunzTarPerm extractEntry .gitattributes 57 silly gunzTarPerm modified mode [ '.gitattributes', 438, 420 ] 58 silly gunzTarPerm extractEntry dht22-node/dht22-node.js 59 silly gunzTarPerm modified mode [ 'dht22-node/dht22-node.js', 438, 420 ] 60 silly gunzTarPerm extractEntry dht22-node/dht22-node.html 61 silly gunzTarPerm modified mode [ 'dht22-node/dht22-node.html', 438, 420 ] 62 silly gunzTarPerm extractEntry dht22-node/icons/dht.png 63 silly gunzTarPerm modified mode [ 'dht22-node/icons/dht.png', 438, 420 ] 64 silly gunzTarPerm extractEntry icons/dht.png 65 silly gunzTarPerm modified mode [ 'icons/dht.png', 438, 420 ] 66 info preinstall node-red-contrib-dht-sensor@0.0.16 67 silly prepareForInstallMany adding node-dht-sensor@0.0.6 from node-red-contrib-dht-sensor dependencies 68 silly cache add args [ 'node-dht-sensor@0.0.6', null ] 69 verbose cache add spec node-dht-sensor@0.0.6 70 silly cache add parsed spec { raw: 'node-dht-sensor@0.0.6', 70 silly cache add scope: null, 70 silly cache add name: 'node-dht-sensor', 70 silly cache add rawSpec: '0.0.6', 70 silly cache add spec: '0.0.6', 70 silly cache add type: 'version' } 71 verbose addNamed node-dht-sensor@0.0.6 72 silly addNamed semver.valid 0.0.6 73 silly addNamed semver.validRange 0.0.6 74 silly mapToRegistry name node-dht-sensor 75 silly mapToRegistry using default registry 76 silly mapToRegistry registry https://registry.npmjs.org/ 77 silly mapToRegistry uri https://registry.npmjs.org/node-dht-sensor 78 verbose addNameVersion registry:https://registry.npmjs.org/node-dht-sensor not in flight; fetching 79 verbose request uri https://registry.npmjs.org/node-dht-sensor 80 verbose request no auth needed 81 info attempt registry request try #1 at 09:51:44 82 verbose etag "EP0I8633FS5VBCEW9Q292W55U" 83 http request GET https://registry.npmjs.org/node-dht-sensor 84 http 304 https://registry.npmjs.org/node-dht-sensor 85 silly get cb [ 304, 85 silly get { date: 'Thu, 11 Jun 2015 13:51:45 GMT', 85 silly get via: '1.1 varnish', 85 silly get 'cache-control': 'max-age=60', 85 silly get etag: '"EP0I8633FS5VBCEW9Q292W55U"', 85 silly get age: '0', 85 silly get connection: 'keep-alive', 85 silly get 'x-served-by': 'cache-iad2133-IAD', 85 silly get 'x-cache': 'MISS', 85 silly get 'x-cache-hits': '0', 85 silly get 'x-timer': 'S1434030705.366400,VS0,VE91', 85 silly get vary: 'Accept' } ] 86 verbose etag https://registry.npmjs.org/node-dht-sensor from cache 87 verbose get saving node-dht-sensor to /home/pi/.npm/registry.npmjs.org/node-dht-sensor/.cache.json 88 silly cache afterAdd node-dht-sensor@0.0.6 89 verbose afterAdd /home/pi/.npm/node-dht-sensor/0.0.6/package/package.json not in flight; writing 90 verbose afterAdd /home/pi/.npm/node-dht-sensor/0.0.6/package/package.json written 91 silly install resolved [ { author: { name: 'David Momenso' }, 91 silly install resolved name: 'node-dht-sensor', 91 silly install resolved description: 'Read data from DHT sensors on Raspberry Pi', 91 silly install resolved version: '0.0.6', 91 silly install resolved repository: { url: 'https://github.com/momenso/node-dht-sensor' }, 91 silly install resolved main: './build/Release/node-dht-sensor', 91 silly install resolved dependencies: {}, 91 silly install resolved scripts: { install: 'node-gyp rebuild' }, 91 silly install resolved gypfile: true, 91 silly install resolved gitHead: 'e25c1826eb05b01a7e0c5e8c56f9313e1b7f2257', 91 silly install resolved bugs: { url: 'https://github.com/momenso/node-dht-sensor/issues' }, 91 silly install resolved homepage: 'https://github.com/momenso/node-dht-sensor', 91 silly install resolved _id: 'node-dht-sensor@0.0.6', 91 silly install resolved _shasum: '1041ed0e88c72381367779c08385f968a311df67', 91 silly install resolved _from: 'node-dht-sensor@0.0.6', 91 silly install resolved _npmVersion: '1.4.28', 91 silly install resolved _npmUser: { name: 'momenso', email: 'momenso@gmail.com' }, 91 silly install resolved maintainers: [ [Object] ], 91 silly install resolved dist: 91 silly install resolved { shasum: '1041ed0e88c72381367779c08385f968a311df67', 91 silly install resolved tarball: 'http://registry.npmjs.org/node-dht-sensor/-/node-dht-sensor-0.0.6.tgz' }, 91 silly install resolved directories: {}, 91 silly install resolved _resolved: 'https://registry.npmjs.org/node-dht-sensor/-/node-dht-sensor-0.0.6.tgz', 91 silly install resolved readme: 'ERROR: No README data found!' } ] 92 info install node-dht-sensor@0.0.6 into /home/pi/node_modules/node-red-contrib-dht-sensor 93 info installOne node-dht-sensor@0.0.6 94 verbose installOne of node-dht-sensor to /home/pi/node_modules/node-red-contrib-dht-sensor not in flight; installing 95 verbose lock using /home/pi/.npm/_locks/node-dht-sensor-b5bfdb8be2358e4a.lock for /home/pi/node_modules/node-red-contrib-dht-sensor/node_modules/node-dht-sensor 96 silly install write writing node-dht-sensor 0.0.6 to /home/pi/node_modules/node-red-contrib-dht-sensor/node_modules/node-dht-sensor 97 silly cache addNamed cb node-dht-sensor@0.0.6 98 verbose unbuild node_modules/node-red-contrib-dht-sensor/node_modules/node-dht-sensor 99 verbose gentlyRm vacuuming /home/pi/node_modules/node-red-contrib-dht-sensor/node_modules/node-dht-sensor 100 verbose tar unpack /home/pi/.npm/node-dht-sensor/0.0.6/package.tgz 101 verbose tar unpacking to /home/pi/node_modules/node-red-contrib-dht-sensor/node_modules/node-dht-sensor 102 verbose gentlyRm vacuuming /home/pi/node_modules/node-red-contrib-dht-sensor/node_modules/node-dht-sensor 103 silly gunzTarPerm modes [ '755', '644' ] 104 silly gunzTarPerm extractEntry package.json 105 silly gunzTarPerm extractEntry .npmignore 106 silly gunzTarPerm extractEntry README.md 107 silly gunzTarPerm extractEntry LICENSE 108 silly gunzTarPerm extractEntry test-spec.js 109 silly gunzTarPerm extractEntry test.js 110 silly gunzTarPerm extractEntry binding.gyp 111 silly gunzTarPerm extractEntry node-dht-sensor.cpp 112 info preinstall node-dht-sensor@0.0.6 113 silly install resolved [] 114 verbose about to build /home/pi/node_modules/node-red-contrib-dht-sensor/node_modules/node-dht-sensor 115 info build /home/pi/node_modules/node-red-contrib-dht-sensor/node_modules/node-dht-sensor 116 verbose linkStuff [ false, 116 verbose linkStuff false, 116 verbose linkStuff false, 116 verbose linkStuff '/home/pi/node_modules/node-red-contrib-dht-sensor/node_modules' ] 117 info linkStuff node-dht-sensor@0.0.6 118 verbose linkBins node-dht-sensor@0.0.6 119 verbose linkMans node-dht-sensor@0.0.6 120 verbose rebuildBundles node-dht-sensor@0.0.6 121 info install node-dht-sensor@0.0.6 122 verbose unsafe-perm in lifecycle true 123 info node-dht-sensor@0.0.6 Failed to exec install script 124 verbose unlock done using /home/pi/.npm/_locks/node-dht-sensor-b5bfdb8be2358e4a.lock for /home/pi/node_modules/node-red-contrib-dht-sensor/node_modules/node-dht-sensor 125 verbose about to build /home/pi/node_modules/node-red-contrib-dht-sensor 126 verbose unlock done using /home/pi/.npm/_locks/node-red-contrib-dht-sen-9e8dbece2600a36d.lock for /home/pi/node_modules/node-red-contrib-dht-sensor 127 verbose stack Error: node-dht-sensor@0.0.6 install: node-gyp rebuild 127 verbose stack Exit status 1 127 verbose stack at EventEmitter. (/usr/local/lib/node_modules/npm/lib/utils/lifecycle.js:213:16) 127 verbose stack at EventEmitter.emit (events.js:110:17) 127 verbose stack at ChildProcess. (/usr/local/lib/node_modules/npm/lib/utils/spawn.js:14:12) 127 verbose stack at ChildProcess.emit (events.js:110:17) 127 verbose stack at maybeClose (child_process.js:1008:16) 127 verbose stack at Process.ChildProcess._handle.onexit (child_process.js:1080:5) 128 verbose pkgid node-dht-sensor@0.0.6 129 verbose cwd /home/pi 130 error Linux 3.18.11+ 131 error argv "/usr/local/bin/node" "/usr/local/bin/npm" "i" "node-red-contrib-dht-sensor" 132 error node v0.12.1 133 error npm v2.5.1 134 error code ELIFECYCLE 135 error node-dht-sensor@0.0.6 install: node-gyp rebuild 135 error Exit status 1 136 error Failed at the node-dht-sensor@0.0.6 install script 'node-gyp rebuild'. 136 error This is most likely a problem with the node-dht-sensor package, 136 error not with npm itself. 136 error Tell the author that this fails on your system: 136 error node-gyp rebuild 136 error You can get their info via: 136 error npm owner ls node-dht-sensor 136 error There is likely additional logging output above. 137 verbose exit [ 1, true ] 138 verbose unbuild node_modules/node-red-contrib-dht-sensor/node_modules/node-dht-sensor 139 info preuninstall node-dht-sensor@0.0.6 140 info uninstall node-dht-sensor@0.0.6 141 verbose unbuild rmStuff node-dht-sensor@0.0.6 from /home/pi/node_modules 142 verbose unbuild rmStuff in /home/pi/node_modules/node-red-contrib-dht-sensor/node_modules 143 info postuninstall node-dht-sensor@0.0.6 144 verbose gentlyRm vacuuming /home/pi/node_modules/node-red-contrib-dht-sensor/node_modules/node-dht-sensor 145 silly gentlyRm purging /home/pi/node_modules/node-red-contrib-dht-sensor/node_modules/node-dht-sensor 146 silly gentlyRm removing /home/pi/node_modules/node-red-contrib-dht-sensor/node_modules 147 silly gentlyRm quitting because other entries in /home/pi/node_modules/node-red-contrib-dht-sensor 148 verbose unbuild node_modules/node-red-contrib-dht-sensor 149 info preuninstall node-red-contrib-dht-sensor@0.0.16 150 info uninstall node-red-contrib-dht-sensor@0.0.16 151 verbose unbuild rmStuff node-red-contrib-dht-sensor@0.0.16 from /home/pi/node_modules 152 info postuninstall node-red-contrib-dht-sensor@0.0.16 153 verbose gentlyRm vacuuming /home/pi/node_modules/node-red-contrib-dht-sensor 154 silly gentlyRm purging /home/pi/node_modules/node-red-contrib-dht-sensor 155 silly gentlyRm quitting because other entries in /home/pi/node_modules pi@p1-node ~ $

bpmurray commented 9 years ago

What version of node have you installed? I have a feeling this may be one of those problematic areas with Node & npm & pi. Because of this, I've been using:

You can check your versions using:

I get 1.4.8 and v0.10.36 respectively.

Also, try using the "--unsafe-perm" when installing modules:

The problem here is that it's claiming that "Arguments" isn't defined. In fact, this is a Node definition from node/v8.h.

juggledad commented 9 years ago

I was doing exactly what you suggested following the install from nodered.org and I got node-red working and installed a couple nodes. I’ve just restarted from scratch (reformatted the sd card) and I see that in order to install node-red-contrib-dht-sensor I have to install node-dht-sensor and in order to install that, I need to install the BCM2835 library.

The BCM2835 library install runs fine but when I do 'npm install node-dht-sensor' I get

npm WARN engine node-dht-sensor@0.0.8: wanted: {"node":">=0.12 <0.13"} (current: {"node":"0.10.36","npm":"1.4.28”})

so I upgraded npn to version 2.11.1 which allows 'node-dht-sensor’ to install but then 'node-red-contrib-dht-sensor’ fails.


Solution

So using npm v 1.4.28, I decided to install an old copy of 'node-dht-sensor' and version 0.0.8 -> 0.0.7 fail, but version 0.0.6 works and allows 'node-red-contrib-dht-sensor’ to install also.

I did have to use ‘sudo' and the ‘-g’ option to get them to show up, but that’s another issue.

juggledad commented 9 years ago

One question, is there any way to get both the temperature and humidity using your node? UPDATE: oh never mind, I looked at the code and found it: msg.humidity - you might want to mention that in the node info display.

bpmurray commented 9 years ago

You beat me to it - once I realised you had gone to 0.0.8, I understood the problem. I have explicitly set the dependency to 0.0.6 since Node-RED can't handle the later versions.

Having them show up requires that they're available to the user running the node-red server. This means that the server runs as you, or that the nodes are installed globally. I found that installing with -g or installing under root using sudo requires the use of --unsafe-perm in the npm command.

juggledad commented 9 years ago

F.Y.I - I installed this on a pi2 using the latest npm - 2.11.3 node - v0.12.7 nose-red - v0.11.1 and node-dht-sensor@0.0.8. I then loaded the node-red-contrib-dht-sensor git to my pi, edited the package.json to set the dependency for node-dht-sensor to 0.0.8 and it is working!!!