ni-c / heimcontrol.js

Home-Automation with node.js and Raspberry PI
MIT License
1.41k stars 297 forks source link

Multiple errors during install #133

Open mwunderlich opened 8 years ago

mwunderlich commented 8 years ago

Hi,

I am trying to install the heimcontrol application, but I keep getting large number of errors. My environment is:

pi@raspberrypi:~/heimcontrol.js $ uname -a Linux raspberrypi 4.1.18-v7+ #846 SMP Thu Feb 25 14:22:53 GMT 2016 armv7l GNU/Linux pi@raspberrypi:~/heimcontrol.js $ npm -v 1.2.15

I first had to remove the PiSwitch dependency (although I will need it for my project at a later stage). I also had to manually install require.js and express.

But even then I am getting the errors below when running "npm install" in the heimcontrol.js directory. Any ideas how to fix these? Thanks a lot.

Cheers,

Martin

pi@raspberrypi:~/heimcontrol.js $ npm install
[...]
npm WARN excluding symbolic link src/du.ino -> duino/duino.ino
[...]
npm ERR! Error: ENOENT, utime '/home/pi/heimcontrol.js/node_modules/duino/node_modules/serialport/src/serialport_poller.h'
npm ERR! If you need help, you may report this log at:
npm ERR!     <http://github.com/isaacs/npm/issues>
npm ERR! or email it to:
npm ERR!     <npm-@googlegroups.com>

npm ERR! System Linux 4.1.18-v7+
npm ERR! command "/usr/local/bin/node" "/usr/local/bin/npm" "install"
npm ERR! cwd /home/pi/heimcontrol.js
npm ERR! node -v v0.10.2
npm ERR! npm -v 1.2.15
npm ERR! path /home/pi/heimcontrol.js/node_modules/duino/node_modules/serialport/src/serialport_poller.h
npm ERR! fstream_path /home/pi/heimcontrol.js/node_modules/duino/node_modules/serialport/src/serialport_poller.h
npm ERR! fstream_type File
npm ERR! fstream_class FileWriter
npm ERR! fstream_finish_call utimes
npm ERR! code ENOENT
npm ERR! errno 34
npm ERR! fstream_stack /opt/node/lib/node_modules/npm/node_modules/fstream/lib/writer.js:305:19
npm ERR! fstream_stack Object.oncomplete (fs.js:107:15)
npm ERR! Error: EACCES, open 'npm-debug.log'
npm ERR!  { [Error: EACCES, open 'npm-debug.log'] errno: 3, code: 'EACCES', path: 'npm-debug.log' }
npm ERR! 
npm ERR! Please try running this command again as root/Administrator.

npm ERR! System Linux 4.1.18-v7+
npm ERR! command "/usr/local/bin/node" "/usr/local/bin/npm" "install"
npm ERR! cwd /home/pi/heimcontrol.js
npm ERR! node -v v0.10.2
npm ERR! npm -v 1.2.15
npm ERR! path npm-debug.log
npm ERR! code EACCES
npm ERR! errno 3
npm ERR! stack Error: EACCES, open 'npm-debug.log'
npm ERR! Error: No compatible version found: has-ansi@'^2.0.0'
npm ERR! Valid install targets:
npm ERR! ["0.1.0","1.0.0","1.0.1","1.0.2","1.0.3","2.0.0"]
npm ERR!     at installTargetsError (/opt/node/lib/node_modules/npm/lib/cache.js:685:10)
npm ERR!     at /opt/node/lib/node_modules/npm/lib/cache.js:607:10
npm ERR!     at saved (/opt/node/lib/node_modules/npm/node_modules/npm-registry-client/lib/get.js:138:7)
npm ERR!     at Object.oncomplete (fs.js:107:15)
npm ERR! If you need help, you may report this log at:
npm ERR!     <http://github.com/isaacs/npm/issues>
npm ERR! or email it to:
npm ERR!     <npm-@googlegroups.com>

npm ERR! System Linux 4.1.18-v7+
npm ERR! command "/usr/local/bin/node" "/usr/local/bin/npm" "install"
npm ERR! cwd /home/pi/heimcontrol.js
npm ERR! node -v v0.10.2
npm ERR! npm -v 1.2.15
[...]
npm ERR! Error: ENOENT, lstat '/home/pi/heimcontrol.js/node_modules/jade/node_modules/constantinople/node_modules/uglify-js/node_modules/source-map/lib/source-map/source-map-generator.js'
npm ERR! If you need help, you may report this log at:
npm ERR!     <http://github.com/isaacs/npm/issues>
npm ERR! or email it to:
npm ERR!     <npm-@googlegroups.com>

npm ERR! System Linux 4.1.18-v7+
npm ERR! command "/usr/local/bin/node" "/usr/local/bin/npm" "install"
npm ERR! cwd /home/pi/heimcontrol.js
npm ERR! node -v v0.10.2
npm ERR! npm -v 1.2.15
npm ERR! path /home/pi/heimcontrol.js/node_modules/jade/node_modules/constantinople/node_modules/uglify-js/node_modules/source-map/lib/source-map/source-map-generator.js
npm ERR! fstream_path /home/pi/heimcontrol.js/node_modules/jade/node_modules/constantinople/node_modules/uglify-js/node_modules/source-map/lib/source-map/source-map-generator.js
npm ERR! fstream_type File
npm ERR! fstream_class FileWriter
npm ERR! code ENOENT
npm ERR! errno 34
npm ERR! fstream_stack /opt/node/lib/node_modules/npm/node_modules/fstream/lib/writer.js:284:26
npm ERR! fstream_stack Object.oncomplete (fs.js:107:15)
npm ERR! Error: ENOENT, lstat '/home/pi/heimcontrol.js/node_modules/jade/node_modules/monocle/node_modules/readdirp/examples/node_modules/tap-stream/node_modules/through/readme.markdown'
npm ERR! If you need help, you may report this log at:
npm ERR!     <http://github.com/isaacs/npm/issues>
npm ERR! or email it to:
npm ERR!     <npm-@googlegroups.com>

npm ERR! System Linux 4.1.18-v7+
npm ERR! command "/usr/local/bin/node" "/usr/local/bin/npm" "install"
npm ERR! cwd /home/pi/heimcontrol.js
npm ERR! node -v v0.10.2
npm ERR! npm -v 1.2.15
npm ERR! path /home/pi/heimcontrol.js/node_modules/jade/node_modules/monocle/node_modules/readdirp/examples/node_modules/tap-stream/node_modules/through/readme.markdown
npm ERR! fstream_path /home/pi/heimcontrol.js/node_modules/jade/node_modules/monocle/node_modules/readdirp/examples/node_modules/tap-stream/node_modules/through/readme.markdown
npm ERR! fstream_type File
npm ERR! fstream_class FileWriter
npm ERR! code ENOENT
npm ERR! errno 34
npm ERR! fstream_stack /opt/node/lib/node_modules/npm/node_modules/fstream/lib/writer.js:284:26
npm ERR! fstream_stack Object.oncomplete (fs.js:107:15)
npm ERR! Error: ENOENT, lstat '/home/pi/heimcontrol.js/node_modules/jade/node_modules/transformers/node_modules/uglify-js/node_modules/source-map/test/source-map/test-util.js'
npm ERR! If you need help, you may report this log at:
npm ERR!     <http://github.com/isaacs/npm/issues>
npm ERR! or email it to:
npm ERR!     <npm-@googlegroups.com>

npm ERR! System Linux 4.1.18-v7+
npm ERR! command "/usr/local/bin/node" "/usr/local/bin/npm" "install"
npm ERR! cwd /home/pi/heimcontrol.js
npm ERR! node -v v0.10.2
npm ERR! npm -v 1.2.15
npm ERR! path /home/pi/heimcontrol.js/node_modules/jade/node_modules/transformers/node_modules/uglify-js/node_modules/source-map/test/source-map/test-util.js
npm ERR! fstream_path /home/pi/heimcontrol.js/node_modules/jade/node_modules/transformers/node_modules/uglify-js/node_modules/source-map/test/source-map/test-util.js
npm ERR! fstream_type File
npm ERR! fstream_class FileWriter
npm ERR! code ENOENT
npm ERR! errno 34
npm ERR! fstream_stack /opt/node/lib/node_modules/npm/node_modules/fstream/lib/writer.js:284:26
npm ERR! fstream_stack Object.oncomplete (fs.js:107:15)
npm ERR! error rolling back Error: ENOTEMPTY, rmdir '/home/pi/heimcontrol.js/node_modules/jade/node_modules'
npm ERR! error rolling back  jade@0.35.0 { [Error: ENOTEMPTY, rmdir '/home/pi/heimcontrol.js/node_modules/jade/node_modules']
npm ERR! error rolling back   errno: 53,
npm ERR! error rolling back   code: 'ENOTEMPTY',
npm ERR! error rolling back   path: '/home/pi/heimcontrol.js/node_modules/jade/node_modules' }
npm ERR! 
npm ERR! Additional logging details can be found in:
npm ERR!     /home/pi/heimcontrol.js/npm-debug.log
npm ERR! not ok code 0
mwunderlich commented 8 years ago

PS: I was following this here installation instruction: http://www.makeuseof.com/tag/how-to-build-home-automation-system-raspberry-pi-and-arduino/

tjanson commented 8 years ago

On first look it seems like all those errors are from dependencies, and you’re using a pretty old version of node. It’s possible that those issues are solved for more recent versions.

However, it’s also possible that the errors persist. Heimcontrol hasn’t seen much work in well over a year and the age is showing – the dependencies should be looked over, some code should be updated for the Raspberry Pi 2, not to mention the new 3 (I don’t have either, by the way).

I’m not currently using Heimcontrol myself, nor is owner @ni-c, afaik. But I think it should still be possible to install it, since the issues here indicate that others are still using it successfully (more or less).


Frankly, depending on what you’re intending to do with this, it might be more suitable to hack up something yourself that’s tailored to your needs. You want to control your RF power outlets, right? You can try PiSwitch by itself and maybe add a web interface – it’s Node after all.

Note that PiSwitch is in a similar state in terms of maintenance (it’s mine, but I don’t use it currently). But if you have any questions about the sockets’ protocol, feel free to ask. It’s pretty simple – PiSwitch is only a hundred lines or so of JS.

mwunderlich commented 8 years ago

Hi Tom,

Thanks a lot for the reply. You are right, my node installation was pretty ancient. I have now update to node version 5.6.0. The installer is still failing with a lot of errors (see below).

What would be some good alternatives to heimcontrol? What I'd like to do is build a system for controlling electrical radiators based on digital thermometers (DS18S20, several per room). I could hack something together myself, but I'd prefer some kind of home automation platform, because the thing might grow into something larger.

Cheers,

Martin


pi@raspberrypi:~/heimcontrol.js $ sudo npm install

> serialport@2.0.6 install /home/pi/heimcontrol.js/node_modules/serialport
> node-pre-gyp install --fallback-to-build

gyp WARN EACCES user "root" does not have permission to access the dev dir "/root/.node-gyp/5.6.0"
gyp WARN EACCES attempting to reinstall using temporary dev dir "/home/pi/heimcontrol.js/node_modules/serialport/.node-gyp"
(node) child_process: options.customFds option is deprecated. Use options.stdio instead.
(node) child_process: options.customFds option is deprecated. Use options.stdio instead.
make: Entering directory '/home/pi/heimcontrol.js/node_modules/serialport/build'
make: *** No rule to make target '../.node-gyp/5.6.0/common.gypi', needed by 'Makefile'.  Stop.
make: Leaving directory '/home/pi/heimcontrol.js/node_modules/serialport/build'
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/opt/node/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:267:23)
gyp ERR! stack     at emitTwo (events.js:100:13)
gyp ERR! stack     at ChildProcess.emit (events.js:185:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
gyp ERR! System Linux 4.1.18-v7+
gyp ERR! command "/opt/node/bin/node" "/opt/node/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--module=/home/pi/heimcontrol.js/node_modules/serialport/build/Release/node-v47-linux-arm/serialport.node" "--module_name=serialport" "--module_path=/home/pi/heimcontrol.js/node_modules/serialport/build/Release/node-v47-linux-arm"
gyp ERR! cwd /home/pi/heimcontrol.js/node_modules/serialport
gyp ERR! node -v v5.6.0
gyp ERR! node-gyp -v v0.9.3
gyp ERR! not ok 
node-pre-gyp ERR! build error 
node-pre-gyp ERR! stack Error: Failed to execute '/opt/node/bin/node /opt/node/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/home/pi/heimcontrol.js/node_modules/serialport/build/Release/node-v47-linux-arm/serialport.node --module_name=serialport --module_path=/home/pi/heimcontrol.js/node_modules/serialport/build/Release/node-v47-linux-arm' (1)
node-pre-gyp ERR! stack     at ChildProcess.<anonymous> (/home/pi/heimcontrol.js/node_modules/serialport/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
node-pre-gyp ERR! stack     at emitTwo (events.js:100:13)
node-pre-gyp ERR! stack     at ChildProcess.emit (events.js:185:7)
node-pre-gyp ERR! stack     at maybeClose (internal/child_process.js:827:16)
node-pre-gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5)
node-pre-gyp ERR! System Linux 4.1.18-v7+
node-pre-gyp ERR! command "/opt/node/bin/node" "/home/pi/heimcontrol.js/node_modules/serialport/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd /home/pi/heimcontrol.js/node_modules/serialport
node-pre-gyp ERR! node -v v5.6.0
node-pre-gyp ERR! node-pre-gyp -v v0.6.18
node-pre-gyp ERR! not ok 
Failed to execute '/opt/node/bin/node /opt/node/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/home/pi/heimcontrol.js/node_modules/serialport/build/Release/node-v47-linux-arm/serialport.node --module_name=serialport --module_path=/home/pi/heimcontrol.js/node_modules/serialport/build/Release/node-v47-linux-arm' (1)
npm WARN heimcontrol.js@0.0.1 No license field.
npm ERR! Linux 4.1.18-v7+
npm ERR! argv "/opt/node/bin/node" "/usr/local/bin/npm" "install"
npm ERR! node v5.6.0
npm ERR! npm  v3.6.0
npm ERR! code ELIFECYCLE

npm ERR! serialport@2.0.6 install: `node-pre-gyp install --fallback-to-build`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the serialport@2.0.6 install script 'node-pre-gyp install --fallback-to-build'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the serialport package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node-pre-gyp install --fallback-to-build
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs serialport
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls serialport
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /home/pi/heimcontrol.js/npm-debug.log
tjanson commented 8 years ago

I’ve heard of OpenHab (Java), Domoticz (C), and FHEM (Perl), which aim to give you a complete home automation solution. FHEM has a large German userbase. I haven’t used any of them, but have heard mostly good things about all three.

Here’s a German blog article about OpenHab/FHEM/DIY which might help. (Coincidentally the author’s arguments in favor of a DIY solution are why I myself chose that route.)

mwunderlich commented 8 years ago

Thanks a lot, Tom, for the hint. I have managed to install OpenHab and it looks extremely comprehensive, as far as the integration possibilities are concerned. Now I only need to connect my temp sensors to it.

Cheers,

Martin

Am 07.03.2016 um 21:48 schrieb Tom Janson notifications@github.com:

I’ve heard of OpenHab http://www.openhab.org/ (Java), Domoticz https://domoticz.com/ (C), and FHEM http://fhem.de/fhem.html (Perl), which aim to give you a complete home automation solution. FHEM has a large German userbase. I haven’t used any of them, but have heard mostly good things about all three.

— Reply to this email directly or view it on GitHub https://github.com/ni-c/heimcontrol.js/issues/133#issuecomment-193442921.