Closed isigmund closed 7 years ago
I think you might need to update your nodejs and npm versions, eslint is node 4+
i have the same issue but with node v4:
npm start
> sonos-http-api@1.0.1 start /opt/node-sonos-http-api
> node server.js
2016-10-12T07:08:35.399Z INFO Presets loaded: { example:
{ players:
[ { roomName: 'Bathroom', volume: 10 },
{ roomName: 'Kitchen', volume: 10 },
{ roomName: 'Office', volume: 10 },
{ roomName: 'Bedroom', volume: 10 },
{ roomName: 'TV Room', volume: 15 } ],
playMode: { shuffle: true, repeat: 'all', crossfade: false },
pauseOthers: false,
favorite: 'My example favorite' } }
events.js:141
throw er; // Unhandled 'error' event
^
Error: listen EADDRINUSE :::5005
at Object.exports._errnoException (util.js:837:11)
at exports._exceptionWithHostPort (util.js:860:20)
at Server._listen2 (net.js:1231:14)
at listen (net.js:1267:10)
at Server.listen (net.js:1363:5)
at Object.<anonymous> (/opt/node-sonos-http-api/server.js:113:8)
at Module._compile (module.js:434:26)
at Object.Module._extensions..js (module.js:452:10)
at Module.load (module.js:355:32)
at Function.Module._load (module.js:310:12)
at Function.Module.runMain (module.js:475:10)
at startup (node.js:117:18)
at node.js:951:3
npm ERR! Linux 4.4.22-v7+
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "start"
npm ERR! node v4.0.0
npm ERR! npm v2.14.2
npm ERR! code ELIFECYCLE
npm ERR! sonos-http-api@1.0.1 start: `node server.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the sonos-http-api@1.0.1 start script 'node server.js'.
npm ERR! This is most likely a problem with the sonos-http-api package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node server.js
npm ERR! You can get their info via:
npm ERR! npm owner ls sonos-http-api
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /opt/node-sonos-http-api/npm-debug.log
@HubertusH I am not sure you are having the same issue at all, no mention of Sonos here :)
@digiltd You were right. I had a totally outdated version installed via apt-get. So after removing the old version I used this to get node 4.6:
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv 68576280
sudo apt-add-repository 'deb https://deb.nodesource.com/node_4.x precise main'
sudo apt-get update
sudo apt-get install nodejs
so after this npm install
worked. I still got one dependency problem though:
ingo@OpenHab2:~/org.openhab.ui.habpanel/web$ npm install
npm WARN package.json habpanel@1.0.0 No README data
npm ERR! Linux 4.2.0-42-generic
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "install"
npm ERR! node v4.6.0
npm ERR! npm v2.15.9
npm ERR! code EPEERINVALID
npm ERR! peerinvalid The package eslint-plugin-react-native@1.2.1 does not satisfy its siblings' peerDependencies requirements!
npm ERR! peerinvalid Peer eslint-config-recommended@1.5.0 wants eslint-plugin-react-native@~2.0.0
npm ERR! Please include the following file with any support request:
npm ERR! /home/ingo/org.openhab.ui.habpanel/web/npm-debug.log
but apparently it did not prevent me to run bower install
and gulp
successfully.
So many thanks take care Ingo
Glad it is working, as I am sure you have noticed npm can easily turn in to a messy nightmare. I am currently working on an Ember project and after running npm install
I now have a node_modules folder that is 107mb and has over 600 folders in the first level.
I am not sure if Habpanel (which is Angular based) even uses React (which in turn uses the ES/Babel combo).
There is an eslint task in the gulpfile, but that might be a left over from a boilerplate or previous project the gulpfile was based on.
Glad it's working too! The eslint part is there because I intended to use it some day, but never got around to actually do it :)
@isigmund if you intend to submit a PR with an added dependency, I'd appreciate it if you could announce your intentions first; the reason I ask is, I'd like to review it beforehand because we need to stabilize the size of the external code (already at ~650k minified now) and don't add too many libraries for isolated use cases. Thanks and happy hacking ;)
@ghys I am working on a new widget to show an analog clock on a panel. I'm going to use http://deepu.js.org/angular-clock/ so there is some new dependencies that I need for that. I will create an enhancement issue to track this. Once I am ready I will create a PR.
Ok, I saw your post in the openHAB community forums. angular-clock looks small enough and the widget could be a welcome addition. Try to avoid linking to the Syncopate font on Google's CDN, in fact try to avoid it at all and use the Roboto font.
I am trying to setup a build environment as described in CONTRIBUTING. When I run
npm install
I get unsatisfied dependencies:Is there something wrong with the package.json ? Any help on getting this resolved is appreciated
Take care Ingo