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 on start: "TypeError: this.ws.on is not a function" #16

Closed
joni999 opened this issue Dec 24, 2024 · 2 comments
Closed

Getting error on start: "TypeError: this.ws.on is not a function" #16

joni999 opened this issue Dec 24, 2024 · 2 comments

Comments

@joni999
Copy link

joni999 commented Dec 24, 2024

Does somebody have a clue what I'm doing wrong to recieve this error? Am I missing a dependency?

[joni@linuxjoni04 discord-presence-roon]$ npm install
(node:5753) ExperimentalWarning: CommonJS module /usr/lib/node_modules/npm/node_modules/debug/src/node.js is loading ES Module /usr/lib/node_modules/npm/node_modules/supports-color/index.js using require().
Support for loading ES Module in require() is an experimental feature and might change at any time
(Use `node --trace-warnings ...` to show where the warning was created)

up to date, audited 53 packages in 339ms

6 packages are looking for funding
  run `npm fund` for details

2 high severity vulnerabilities

Some issues need review, and may require choosing
a different dependency.

Run `npm audit` for details.

[joni@linuxjoni04 discord-presence-roon]$ node .
 INFO: Extension: Reloading settings 
 INFO: Imgur: Using Album  
 INFO: Discord: Authed for user arrpc 
/home/joni/git/discord-presence-roon/discord-presence-roon/node_modules/@roonlabs/node-roon-api/transport-websocket.js:17
    this.ws.on('pong', () => this.is_alive = true);
            ^

TypeError: this.ws.on is not a function
    at new Transport (/home/joni/git/discord-presence-roon/discord-presence-roon/node_modules/@roonlabs/node-roon-api/transport-websocket.js:17:13)
    at RoonApi.ws_connect (/home/joni/git/discord-presence-roon/discord-presence-roon/node_modules/@roonlabs/node-roon-api/lib.js:397:23)
    at Sood.<anonymous> (/home/joni/git/discord-presence-roon/discord-presence-roon/node_modules/@roonlabs/node-roon-api/lib.js:143:66)
    at Sood.emit (node:events:513:28)
    at Socket.<anonymous> (/home/joni/git/discord-presence-roon/discord-presence-roon/node_modules/@roonlabs/node-roon-api/sood.js:145:27)
    at Socket.emit (node:events:513:28)
    at UDP.onMessage [as onmessage] (node:dgram:948:8)

Node.js v23.3.0
[joni@linuxjoni04 discord-presence-roon]$ 

I'm on up to date CachyOS (Arch Linux)

@joni999
Copy link
Author

joni999 commented Dec 24, 2024

Ah hold on - looks like I'm running into this issue on roon's node API:
RoonLabs/node-roon-api#37

@joni999
Copy link
Author

joni999 commented Dec 24, 2024

It seems to work with the described fix - will close this as it's not caused by the repo here.

@joni999 joni999 closed this as completed Dec 24, 2024
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

1 participant