jishi / node-sonos-web-controller

A web based controller for Sonos utilizing web sockets for a native look and feel
MIT License
247 stars 45 forks source link

Raspberry Pi 2. HTTP API not started #40

Closed EvZag closed 8 years ago

EvZag commented 8 years ago

Hi Jishi

I installed web controller. It's work fine But http-api don't want to start I'm attaching npm-debug.log

EvZag commented 8 years ago

0 info it worked if it ends with ok 1 verbose cli [ '/usr/bin/nodejs', '/usr/bin/npm', 'start' ] 2 info using npm@1.4.21 3 info using node@v0.10.29 4 verbose run-script [ 'prestart', 'start', 'poststart' ] 5 info prestart sonos-http-api@0.18.1 6 info start sonos-http-api@0.18.1 7 verbose unsafe-perm in lifecycle true 8 info sonos-http-api@0.18.1 Failed to exec start script 9 error sonos-http-api@0.18.1 start: node server.js 9 error Exit status 8 10 error Failed at the sonos-http-api@0.18.1 start script. 10 error This is most likely a problem with the sonos-http-api package, 10 error not with npm itself. 10 error Tell the author that this fails on your system: 10 error node server.js 10 error You can get their info via: 10 error npm owner ls sonos-http-api 10 error There is likely additional logging output above. 11 error System Linux 4.1.18-v7+ 12 error command "/usr/bin/nodejs" "/usr/bin/npm" "start" 13 error cwd /home/pi/node-sonos-http-api 14 error node -v v0.10.29 15 error npm -v 1.4.21 16 error code ELIFECYCLE 17 verbose exit [ 1, true ]

jishi commented 8 years ago

You are using node 0.10.29, which is a very old version of node. The web controller is fine with that version, but the HTTP API requires node 4+ now. Try and upgrade and it should work correctly after that.

EvZag commented 8 years ago

can you advice me how to upgrade my node js. I am new in linux

jishi commented 8 years ago

Uninstall the nodejs package (looks like you are using raspbian) with apt-get remove nodejs

Then download the appropriate version from https://nodejs.org/en/download/. If you are using a pi 2, download the ARMv7 version. If it's the first version pi (A, B or B+), download the ARMv6 version.

To extract it, you also need xz, install that with apt-get install xz

To extract it, invoke tar --strip-components 1 -C /usr -Jxf node-v4.3.1-linux-armv7l.tar.xz (or armv6 if that was what you downloaded).