Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exception thrown ! #1

Open
pcouderc12 opened this issue Mar 20, 2020 · 8 comments
Open

Exception thrown ! #1

pcouderc12 opened this issue Mar 20, 2020 · 8 comments

Comments

@pcouderc12
Copy link

ous@pcouderc:~/projets/bose/Bose-Soundtouch-Alt-Interface$ node server.js
internal/modules/cjs/loader.js:583
throw err;
^

Error: Cannot find module 'express'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:581:15)
at Function.Module._load (internal/modules/cjs/loader.js:507:25)
at Module.require (internal/modules/cjs/loader.js:637:17)
at require (internal/modules/cjs/helpers.js:22:18)
at Object. (/home/nous/projets/bose/Bose-Soundtouch-Alt-Interface/server.js:2:17)
at Module._compile (internal/modules/cjs/loader.js:689:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10)
at Module.load (internal/modules/cjs/loader.js:599:32)
at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
at Function.Module._load (internal/modules/cjs/loader.js:530:3)

Please note that I have installed node.js and npm with apt install on debian buster.
Thanks for help
PC

@kdw2060
Copy link
Owner

kdw2060 commented Mar 20, 2020

did you execute the 'npm install' command? Sounds like you might have missed that step.

@pcouderc12
Copy link
Author

No ! My mistake. I thought that "install" was done by "apt install". Thank ou it is better now !

@pcouderc12
Copy link
Author

now I get :
nous@pcouderc:~/projets/bose/Bose-Soundtouch-Alt-Interface$ node server.js
/home/nous/projets/bose/Bose-Soundtouch-Alt-Interface/server.js:48
let ethernet = os.networkInterfaces().Ethernet.length;
^

TypeError: Cannot read property 'length' of undefined
at Object. (/home/nous/projets/bose/Bose-Soundtouch-Alt-Interface/server.js:48:49)
at Module._compile (internal/modules/cjs/loader.js:689:30)
...

@pcouderc12
Copy link
Author

pcouderc12 commented Mar 20, 2020

node.js release is 10.15.2 (!!!)

@kdw2060
Copy link
Owner

kdw2060 commented Mar 22, 2020

I'm figuring that code bit that autodiscovers the ip adress out as I go too. Can't tell why it doesn't work on your device without access to it.

If you know the ip-address of the device you're running my app on, then comment out lines 40-50 in server.js and change line 39 into let deviceIP = 'your ip'

@pcouderc12
Copy link
Author

Thank you, I do not know node.js but I try to debug it...

@pcouderc12
Copy link
Author

Fine, it works not so bad...
1- I succes to get dinner ready. It is fine in these times of coronavirus : we can eat at least instead of going out...
2- But I do not success to change the volume.. It seems to change but dinner's volume does not change
3- I cannot get any station playing : I get a message :
error: StatusCodeError: 500 - "<errors deviceID="304511AD6755"><error value="1005" name="UNKNOWN_SOURCE_ERROR" severity="Unknown">1005"
4- For deviceIP discovery, I am on linux with no eth0, only lo an wlp1s0 (wifi). I suggest a loop on all interfaces, and keep, the first starting with "e" or "w" and 127.0.0.1 if none. I do not know node.js so I cannot suggest a patch.
Thank you very much for this fine app.
pierre at couderc.eu

@pcouderc12
Copy link
Author

Mmm, I do no t think I wanted to close it...

@pcouderc12 pcouderc12 reopened this Mar 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants