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

Getting error when commanding node server.js #70

Closed
sw764206 opened this issue May 10, 2020 · 7 comments
Closed

Getting error when commanding node server.js #70

sw764206 opened this issue May 10, 2020 · 7 comments

Comments

@sw764206
Copy link

Im getting the error below when initializing node server.js

node server.js
no settings file found, will only use default settings
/volume1/homes/admin/sonosweb/node_modules/socket.io/node_modules/ws/lib/websocket.js:348
...options
^^^

SyntaxError: Unexpected token ...
at createScript (vm.js:56:10)
at Object.runInThisContext (vm.js:97:10)
at Module._compile (module.js:542:28)
at Object.Module._extensions..js (module.js:579:10)
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12)
at Function.Module._load (module.js:438:3)
at Module.require (module.js:497:17)
at require (internal/module.js:20:19)
at Object. (/volume1/homes/admin/sonosweb/node_modules/socket.io/node_modules/ws/index.js:3:19)

@sw764206
Copy link
Author

and now im getting this error
0 info it worked if it ends with ok
1 verbose cli [ '/volume1/@appstore/Node.js_v6/usr/local/bin/node',
1 verbose cli '/usr/local/bin/npm',
1 verbose cli 'start' ]
2 info using npm@3.10.10
3 info using node@v6.12.3
4 verbose run-script [ 'prestart', 'start', 'poststart' ]
5 info lifecycle sonos-web-controller@0.14.0prestart: sonos-web-controller@0.14.0
6 silly lifecycle sonos-web-controller@0.14.0
prestart: no script for prestart, continuing
7 info lifecycle sonos-web-controller@0.14.0start: sonos-web-controller@0.14.0
8 verbose lifecycle sonos-web-controller@0.14.0
start: unsafe-perm in lifecycle true
9 verbose lifecycle sonos-web-controller@0.14.0start: PATH: /usr/local/lib/node_modules/npm/bin/node-gyp-bin:/volume1/homes/admin/websonos/node_modules/.bin:/volume1/@appstore/Node.js_v6/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/syno/sbin:/usr/syno/bin:/usr/local/sbin:/usr/local/bin
10 verbose lifecycle sonos-web-controller@0.14.0
start: CWD: /volume1/homes/admin/websonos
11 silly lifecycle sonos-web-controller@0.14.0start: Args: [ '-c', 'node server.js' ]
12 silly lifecycle sonos-web-controller@0.14.0
start: Returned: code: 1 signal: null
13 info lifecycle sonos-web-controller@0.14.0~start: Failed to exec start script
14 verbose stack Error: sonos-web-controller@0.14.0 start: node server.js
14 verbose stack Exit status 1
14 verbose stack at EventEmitter. (/usr/local/lib/node_modules/npm/lib/utils/lifecycle.js:255:16)
14 verbose stack at emitTwo (events.js:106:13)
14 verbose stack at EventEmitter.emit (events.js:191:7)
14 verbose stack at ChildProcess. (/usr/local/lib/node_modules/npm/lib/utils/spawn.js:40:14)
14 verbose stack at emitTwo (events.js:106:13)
14 verbose stack at ChildProcess.emit (events.js:191:7)
14 verbose stack at maybeClose (internal/child_process.js:920:16)
14 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:230:5)
15 verbose pkgid sonos-web-controller@0.14.0
16 verbose cwd /volume1/homes/admin/websonos
17 error Linux 3.10.105
18 error argv "/volume1/@appstore/Node.js_v6/usr/local/bin/node" "/usr/local/bin/npm" "start"
19 error node v6.12.3
20 error npm v3.10.10
21 error code ELIFECYCLE
22 error sonos-web-controller@0.14.0 start: node server.js
22 error Exit status 1
23 error Failed at the sonos-web-controller@0.14.0 start script 'node server.js'.
23 error Make sure you have the latest version of node.js and npm installed.
23 error If you do, this is most likely a problem with the sonos-web-controller package,
23 error not with npm itself.
23 error Tell the author that this fails on your system:
23 error node server.js
23 error You can get information on how to open an issue for this project with:
23 error npm bugs sonos-web-controller
23 error Or if that isn't available, you can get their info via:
23 error npm owner ls sonos-web-controller
23 error There is likely additional logging output above.
24 verbose exit [ 1, true ]

@jishi
Copy link
Owner

jishi commented May 10, 2020 via email

@sw764206
Copy link
Author

Thank for your the response! Argh! That sucks I was so excited to get this controller on my home tablets. I think the same is for your HTTP controller correct?

@sw764206
Copy link
Author

Also will you be planning on updating your http api and this web controller scripts after S2 is released? Or are you planning on retiring them?

I figured i could use them now and disable automatic updates on my system until a new version that works with S2 is released

@jishi
Copy link
Owner

jishi commented May 11, 2020

Seems like I did an upgrade of socket.io to 2.x.x at some point, which probably lost compatibility with node 6.x.

I have upgraded twice, once from 0.9.x to 1.4.5+ and then 2.2.0, but I'm unsure which one broke node 6 compatibility. socket.io doesn't say in their release notes, probably because it is some dependency that is actually the culprit.

Try installing a specific version with: npm install socket.io@1.7.4 (it might even work with 2.0.4, I think it broke in 2.1.0 when they switched websocket library), or even older, like 0.9.19. I think it should be backward-compatible.

@jishi
Copy link
Owner

jishi commented May 11, 2020

Since I haven't gotten any info about S2 nor what it's about, I can't say if I will make a new version that works with S2. The reason I'm suspecting that S2 will break this is because I know that they have been working on cloud-control and have had limited features available through cloud-control. With that in place, I believe that the UPnP api will be obsoleted, and I also think this is what all the fuzz about not being able to make gen1 and gen2 players to work together is about.

With a cloud-control API, most of this will be much easier to implement, but you will still have quite the struggle to use the cloud api with home automation because of authentication etc. There might still be room for similar software, but then I assume it would be a cloud-service that just simplifies the API, and just use static URL tokens (like my bronos solution, http://www.bronos.net/).

We'll see in June what they actually release :)

@sw764206
Copy link
Author

sw764206 commented May 11, 2020 via email

@jishi jishi closed this as completed May 13, 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