Open BzowK opened 8 years ago
I'm having the same issue. I've tested this on a Raspberry Pi 3 / Raspbian Jessie & on LXC Ubuntu 14.04 LTS
Is there any work arounds? I would love to get this working with HA
I'm having the same issue as BzowK on the Raspberry Pi 3 with Raspbian.
@jettw @ez2remember @BzowK try installing the latest version of Node... For Raspberry Pi, use these commands:
wget http://node-arm.herokuapp.com/node_latest_armhf.deb
sudo dpkg -i node_latest_armhf.deb
@BzowK @ez2remember @jettw I'm not sure if you are still tracking this thread, but I had just about every issue you did and I think we've cleaned things up a bit so that it should work on your Raspberry Pi. Would you mind testing out the pull request? https://github.com/almcelmon/dasher.git https://github.com/almcelmon/dasher. Big thanks to @legotheboss for the ideas on pulling it all together.
@almcelmon Thanks so much! I just did a pull on my Ubuntu LXC & everything is working now. I set up two dash buttons that are connected to home assistant. awesome
Had the same issue and nothing would work. Finally had to go to node 0.10.26 on the pi.
Used NVM instead of direct node install. curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.32.1/install.sh | bash nvm install 0.10.26
@webdigi Worked! Thank you!
Hello - I'm having the same problem as OP. I have followed each of the steps in this thread and now I receive an "Unexpected token ILLEGAL" error (see below). Any suggestions? Can I provide any other logs etc?
pi@hassbian:~/dasher $ npm install
SyntaxError: Unexpected token ILLEGAL
at exports.runInThisContext (vm.js:53:16)
at Module._compile (module.js:414:25)
at Object.Module._extensions..js (module.js:442:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:311:12)
at Module.require (module.js:366:17)
at require (module.js:385:17)
at Object.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/request/node_modules/hawk/lib/index.js:7:18)
at Module._compile (module.js:435:26)
at Object.Module._extensions..js (module.js:442:10)
npm ERR! Linux 4.4.50-v7+
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install"
npm ERR! node v4.2.1
npm ERR! npm v2.14.7
npm ERR! Unexpected token ILLEGAL
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR! <https://github.com/npm/npm/issues>
I started with a fresh install just in case one of my intermediate "remedial" steps had caused this to error. I followed the steps above and now have the below error. Any ideas?
pi@hassbian:~/dasher $ npm install
npm WARN engine socketwatcher@0.3.0: wanted: {"node":">=4"} (current: {"node":"0.10.29","npm":"1.4.21"})
> socketwatcher@0.3.0 install /home/pi/dasher/node_modules/node-dash-button/node_modules/pcap/node_modules/socketwatcher
> node-gyp rebuild
make: Entering directory '/home/pi/dasher/node_modules/node-dash-button/node_modules/pcap/node_modules/socketwatcher/build'
CXX(target) Release/obj.target/socketwatcher/socket_watcher.o
In file included from ../socket_watcher.hpp:8:0,
from ../socket_watcher.cpp:5:
../../nan/nan.h:326:47: error: ‘REPLACE_INVALID_UTF8’ is not a member of ‘v8::String’
static const unsigned kReplaceInvalidUtf8 = v8::String::REPLACE_INVALID_UTF8;
^
socketwatcher.target.mk:82: recipe for target 'Release/obj.target/socketwatcher/socket_watcher.o' failed
make: *** [Release/obj.target/socketwatcher/socket_watcher.o] Error 1
make: Leaving directory '/home/pi/dasher/node_modules/node-dash-button/node_modules/pcap/node_modules/socketwatcher/build'
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/share/node-gyp/lib/build.js:267:23)
gyp ERR! stack at ChildProcess.emit (events.js:98:17)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:809:12)
gyp ERR! System Linux 4.4.38-v7+
gyp ERR! command "nodejs" "/usr/bin/node-gyp" "rebuild"
gyp ERR! cwd /home/pi/dasher/node_modules/node-dash-button/node_modules/pcap/node_modules/socketwatcher
gyp ERR! node -v v0.10.29
gyp ERR! node-gyp -v v0.12.2
gyp ERR! not ok
npm WARN This failure might be due to the use of legacy binary "node"
npm WARN For further explanations, please read
/usr/share/doc/nodejs/README.Debian
npm ERR! socketwatcher@0.3.0 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the socketwatcher@0.3.0 install script.
npm ERR! This is most likely a problem with the socketwatcher 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 socketwatcher
npm ERR! There is likely additional logging output above.
npm ERR! System Linux 4.4.38-v7+
npm ERR! command "/usr/bin/nodejs" "/usr/bin/npm" "install"
npm ERR! cwd /home/pi/dasher
npm ERR! node -v v0.10.29
npm ERR! npm -v 1.4.21
npm ERR! code ELIFECYCLE
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /home/pi/dasher/npm-debug.log
npm ERR! not ok code 0
pi@hassbian:~/dasher $
I am having a similar issue as ebdyford while installing dasher for HA on my Raspberry Pi3. Any suggestions will be highly appreciated.
pi@Hassbian:~/dasher $ npm install
npm WARN engine socketwatcher@0.3.0: wanted: {"node":">=4"} (current: {"node":"0.10.29","npm":"1.4.21"})
> socketwatcher@0.3.0 install /home/pi/dasher/node_modules/node-dash-button/node_modules/pcap/node_modules/socketwatcher
> node-gyp rebuild
make: Entering directory '/home/pi/dasher/node_modules/node-dash-button/node_modules/pcap/node_modules/socketwatcher/build'
CXX(target) Release/obj.target/socketwatcher/socket_watcher.o
In file included from ../socket_watcher.hpp:8:0,
from ../socket_watcher.cpp:5:
../../nan/nan.h:326:47: error: ‘REPLACE_INVALID_UTF8’ is not a member of ‘v8::String’
static const unsigned kReplaceInvalidUtf8 = v8::String::REPLACE_INVALID_UTF8;
^
socketwatcher.target.mk:82: recipe for target 'Release/obj.target/socketwatcher/socket_watcher.o' failed
make: *** [Release/obj.target/socketwatcher/socket_watcher.o] Error 1
make: Leaving directory '/home/pi/dasher/node_modules/node-dash-button/node_modules/pcap/node_modules/socketwatcher/build'
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/share/node-gyp/lib/build.js:267:23)
gyp ERR! stack at ChildProcess.emit (events.js:98:17)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:809:12)
gyp ERR! System Linux 4.4.50-v7+
gyp ERR! command "nodejs" "/usr/bin/node-gyp" "rebuild"
gyp ERR! cwd /home/pi/dasher/node_modules/node-dash-button/node_modules/pcap/node_modules/socketwatcher
gyp ERR! node -v v0.10.29
gyp ERR! node-gyp -v v0.12.2
gyp ERR! not ok
npm WARN This failure might be due to the use of legacy binary "node"
npm WARN For further explanations, please read
/usr/share/doc/nodejs/README.Debian
npm ERR! socketwatcher@0.3.0 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the socketwatcher@0.3.0 install script.
npm ERR! This is most likely a problem with the socketwatcher 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 socketwatcher
npm ERR! There is likely additional logging output above.
npm ERR! System Linux 4.4.50-v7+
npm ERR! command "/usr/bin/nodejs" "/usr/bin/npm" "install"
npm ERR! cwd /home/pi/dasher
npm ERR! node -v v0.10.29
npm ERR! npm -v 1.4.21
npm ERR! code ELIFECYCLE
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /home/pi/dasher/npm-debug.log
npm ERR! not ok code 0
Hi, @nikhilkhade @edbyford did you manage to solve it??
I am stuck with the same errors and versions.
@sekisek Your node is out of date. Run these commands:
sudo apt-get remove nodejs
wget http://node-arm.herokuapp.com/node_latest_armhf.deb
sudo dpkg -i node_latest_armhf.deb
Hey - Thanks for the script. Trying to use, but cannot get working. Have tried setting up in two separate linux environments with same issue. Below is environment, procedure i followed, and results. Any suggestions? Thanks
Environment
I also tried Ubuntu 15.10 inside VM Workstation /w bridged NIC and got similar results
Procedure
Any suggestions? Am I leaving out a big step? Thanks!
UPDATE After posting, I went back to the Ubunutu 15 VM. I installed nodejs-legacy then tried again and this time 'npm install' again and this time it completed without errors. I had tried installing it in Raspbian on my RP, but it was already installed and up to date so doesn't help there. Would still much prefer to run on RP so the above post is still valid as all notes come from its installation. Thanks!
UPDATE #2 OK, ok, I spoke too soon... 'npm install' seemed to be successful as I didn't see any error messages. I edited the example config file (below) and then saved it in the same path as config.json. While still in the 'dasher' root, I then ran 'sudo npm run start' - it started! I clicked my dash button and after a few seconds, the terminal flooded with about 20 mesage about EthernetFrame. The trigger from IFTTT never went so I clicked the button again. Almost instantly, I got the echo "undefined press" followed by many lines of echo in the terminal. I quit npm, then tried launching it again but got errors. All of the events described are below followed by my config file...
My (Edited) config.json file
Thoughts? Thanks!