Closed galley9 closed 6 years ago
npm WARN checkPermissions Missing write access to /home/pi/.node-red/node_modules/openzwave-shared
The message is pretty clear: the directory permissions are wrong. Use sudo chown -R pi /home/pi/.node-red/
to reassign ownership to the pi
user and you should be OK.
BTW, You're trying to install openzwave-shared
directly as a node-red dependency. You actually need to do npm install node-red-contrib-openzwave
within .node-red
instead. This is the node-red binding module that adds the OpenZwave-shared nodes within Node-red.
You can use openZWave through openzwave-shared
from within ANY javascript program, if you want to play with node-red (which I strongly suggest for a newcomer!), then you must use the node-red-contrib-openzwave
module.
Hello Elias,
Thank you very much for the help.
I followed these steps: 1- sudo chown -R pi /home/pi/.node-red/ 2 - cd /.node red 3 - npm install node-red-contrib-openzwave
This is the output:
pi@taboo:~/.node-red $ npm install node-red-contrib-openzwave
openzwave-shared@1.4.0 preinstall /home/pi/.node-red/node_modules/.staging/openzwave-shared-32881044 node lib/install-ozw.js
openzwave-shared@1.4.0 install /home/pi/.node-red/node_modules/openzwave-shared node-gyp rebuild
make: Entering directory '/home/pi/.node-red/node_modules/openzwave-shared/build' CXX(target) Release/obj.target/openzwave_shared/src/callbacks.o In file included from ../src/callbacks.cc:18:0: ../src/openzwave.hpp:29:21: fatal error: Manager.h: No such file or directory
include "Manager.h"
^
compilation terminated. openzwave_shared.target.mk:115: recipe for target 'Release/obj.target/openzwave_shared/src/callbacks.o' failed make: *** [Release/obj.target/openzwave_shared/src/callbacks.o] Error 1 make: Leaving directory '/home/pi/.node-red/node_modules/openzwave-shared/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:285:23) gyp ERR! stack at emitTwo (events.js:106:13) gyp ERR! stack at ChildProcess.emit (events.js:194:7) gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:215:12) gyp ERR! System Linux 4.4.50+ gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" gyp ERR! cwd /home/pi/.node-red/node_modules/openzwave-shared gyp ERR! node -v v7.7.4 gyp ERR! node-gyp -v v3.6.0 gyp ERR! not ok npm WARN node-red-project@0.0.1 No repository field. npm WARN node-red-project@0.0.1 No license field. npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! openzwave-shared@1.4.0 install:node-gyp rebuild
npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the openzwave-shared@1.4.0 install script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.npm ERR! A complete log of this run can be found in: npm ERR! /home/pi/.npm/_logs/2017-12-08T22_35_19_738Z-debug.log pi@taboo:~/.node-red $
For some reason, it cannot find Manager.h. I don't know if this is a temporary filed created in the "Make" process but I cannot find it in that area either.
I have tried to use the "Manage palette" option in the node-red ui. When I install, I get this output from the console window I started node-red with.
8 Dec 18:51:18 - [info] Installing module: node-red-contrib-openzwave, version: 1.2.1 8 Dec 18:52:50 - [warn] Installation of module node-red-contrib-openzwave failed: 8 Dec 18:52:50 - [warn] ------------------------------------------ 8 Dec 18:52:50 - [warn] Error: Command failed: npm install --save --save-prefix="~" --production node-red-contrib-openzwave@1.2.1 In file included from ../src/callbacks.cc:18:0: ../src/openzwave.hpp:29:21: fatal error: Manager.h: No such file or directory
include "Manager.h"
^ compilation terminated. make: *** [Release/obj.target/openzwave_shared/src/callbacks.o] Error 1 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:285:23) gyp ERR! stack at emitTwo (events.js:106:13) gyp ERR! stack at ChildProcess.emit (events.js:194:7) gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:215:12) gyp ERR! System Linux 4.4.50+ gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" gyp ERR! cwd /home/pi/.node-red/node_modules/openzwave-shared gyp ERR! node -v v7.7.4 gyp ERR! node-gyp -v v3.6.0 gyp ERR! not ok npm WARN node-red-project@0.0.1 No repository field. npm WARN node-red-project@0.0.1 No license field. npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! openzwave-shared@1.4.0 install:node-gyp rebuild
npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the openzwave-shared@1.4.0 install script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above. npm ERR! A complete log of this run can be found in: npm ERR! /home/pi/.npm/_logs/2017-12-09T00_52_50_440Z-debug.log 8 Dec 18:52:50 - [warn] ------------------------------------------
Any ideas or alternative methods getting the node-red nodes set up, please let me know.
I appreciate the help. -bill
#include "Manager.h"
This means you're missing OpenZWave development files from your system On a recent Rasbpian you can install it with:
sudo apt-get -y install libopenzwave1.5-dev
I have very little Linux experience so if you offer a solution please be very specific and detailed.
I have successfully made it to step #2. I did not have any luck installing the "(New!) Download and install the precompiled Raspbian/ARMv6 packages for Raspberry 1:" so I have chosen the Hercules' path of blight.
The following commands executed successfully:
The command "MinOZW /dev/ttyACM0" returns:
I am unclear as to the meaning of "project directory" so I entered the following command:
cd ~/.node-red
The prompt now looks like:
pi@taboo:~/.node-red $
The contents of the directory is as follows:
Upon entering the command:
npm install openzwave-shared
The following output is generated:
Here are the contents of 2017-11-28T19_53_37_320Z-debug.log: 2017-11-28T19_53_37_320Z-debug.log
Any help or direction would be greatly appreciated as I am about 3 weeks on and off of trying to figure out on my own. Kind Regards -bill