sonos-web icon indicating copy to clipboard operation
sonos-web copied to clipboard

Cannot find Module listener

Open rickschwabe opened this issue 5 years ago • 7 comments

Hello your project looks very nice, but i have a probem with running the script.

`C:\Program Files\nodejs\sonos-web>npm start

[email protected] start C:\Program Files\nodejs\sonos-web node server.js

internal/modules/cjs/loader.js:638 throw err; ^

Error: Cannot find module 'sonos/lib/events/listener' at Function.Module._resolveFilename (internal/modules/cjs/loader.js:636:15) at Function.Module._load (internal/modules/cjs/loader.js:562:25) at Module.require (internal/modules/cjs/loader.js:692:17) at require (internal/modules/cjs/helpers.js:25:18) at Object. (C:\Program Files\nodejs\sonos-web\server.js:10:18) at Module._compile (internal/modules/cjs/loader.js:778:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10) at Module.load (internal/modules/cjs/loader.js:653:32) at tryModuleLoad (internal/modules/cjs/loader.js:593:12) at Function.Module._load (internal/modules/cjs/loader.js:585:3) npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! [email protected] start: node server.js npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the [email protected] start 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! C:\Users\User\AppData\Roaming\npm-cache_logs\2019-10-03T19_21_21_924Z-debug.log

C:\Program Files\nodejs\sonos-web>`

The problem is the same on Ubuntu, CentOS and Windows 7

rickschwabe avatar Oct 03 '19 19:10 rickschwabe

Can you please try again? I made a few changes locally some time ago, but never pushed them

denysvitali avatar Oct 03 '19 19:10 denysvitali

Thanks for the fast response. :) Now the script starts fine, but i think there are some other bugs.

I can search youtube Videos but this error show in the console.

(node:4196) UnhandledPromiseRejectionWarning: Error: Request failed with status code 500 at createError (/home/rick/sonos-web/node_modules/axios/lib/core/createError.js:16:15) at settle (/home/rick/sonos-web/node_modules/axios/lib/core/settle.js:17:12) at IncomingMessage.handleStreamEnd (/home/rick/sonos-web/node_modules/axios/lib/adapters/http.js:237:11) at emitNone (events.js:111:20) at IncomingMessage.emit (events.js:208:7) at endReadableNT (_stream_readable.js:1064:12) at _combinedTickCallback (internal/process/next_tick.js:138:11) at process._tickCallback (internal/process/next_tick.js:180:9) (node:4196) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 2) (node:4196) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code. (node:4196) UnhandledPromiseRejectionWarning: Error: Request failed with status code 500 at createError (/home/rick/sonos-web/node_modules/axios/lib/core/createError.js:16:15) at settle (/home/rick/sonos-web/node_modules/axios/lib/core/settle.js:17:12) at IncomingMessage.handleStreamEnd (/home/rick/sonos-web/node_modules/axios/lib/adapters/http.js:237:11) at emitNone (events.js:111:20) at IncomingMessage.emit (events.js:208:7) at endReadableNT (_stream_readable.js:1064:12) at _combinedTickCallback (internal/process/next_tick.js:138:11) at process._tickCallback (internal/process/next_tick.js:180:9) (node:4196) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 4)

And other things.

  • Music Cover not change, only default is visible

  • The play button did not change the state

  • The Volume not Change only default is 0

rickschwabe avatar Oct 03 '19 20:10 rickschwabe

I'm so sorry, I don't have my Sonos device here with me - I'll go home this weekend and bring it here, so that I can start improving the software. I'll keep you posted

denysvitali avatar Oct 03 '19 21:10 denysvitali

This is not a problem. Then I'll wait for your update. For further tests, I am also available.

rickschwabe avatar Oct 03 '19 21:10 rickschwabe

Unfortunately I wasn't able to get my Sonos Play:3 device at home :(

I'll try to fix the issue in the following days without it

denysvitali avatar Oct 07 '19 21:10 denysvitali

This is a pity. But no problem, I can test that too. Then I have one more question, will more plugins follow? For example, TuneIn for Radio

rickschwabe avatar Oct 07 '19 21:10 rickschwabe

Hey, any news ? 🤔

rickschwabe avatar Oct 22 '19 19:10 rickschwabe