platodev
platodev2mo ago

websockets package

an npm package using websockets I use fails
deno run --allow-all cli.ts
error: Uncaught (in promise) TypeError: (0 , G.default) is not a function
at https://esm.sh/v135/rpc-websockets@7.9.0/denonext/dist/lib/client.js:17:1461
at https://esm.sh/v135/rpc-websockets@7.9.0/denonext/dist/lib/client.js:17:1583
at https://esm.sh/v135/rpc-websockets@7.9.0/denonext/dist/lib/client.js:17:452
at https://esm.sh/v135/rpc-websockets@7.9.0/denonext/dist/lib/client.js:17:2248
at https://esm.sh/v135/rpc-websockets@7.9.0/denonext/dist/lib/client.js:17:452
at https://esm.sh/v135/rpc-websockets@7.9.0/denonext/dist/lib/client.js:17:8516
deno run --allow-all cli.ts
error: Uncaught (in promise) TypeError: (0 , G.default) is not a function
at https://esm.sh/v135/rpc-websockets@7.9.0/denonext/dist/lib/client.js:17:1461
at https://esm.sh/v135/rpc-websockets@7.9.0/denonext/dist/lib/client.js:17:1583
at https://esm.sh/v135/rpc-websockets@7.9.0/denonext/dist/lib/client.js:17:452
at https://esm.sh/v135/rpc-websockets@7.9.0/denonext/dist/lib/client.js:17:2248
at https://esm.sh/v135/rpc-websockets@7.9.0/denonext/dist/lib/client.js:17:452
at https://esm.sh/v135/rpc-websockets@7.9.0/denonext/dist/lib/client.js:17:8516
4 Replies
Deno AI Helper
Deno AI Helper2mo ago
I wasn't able to find the answer to your question in the official Deno documentation. However, based on the error message you've provided, it seems like there might be an issue with the way the rpc-websockets package is being imported or used within your Deno project. The error (0 , G.default) is not a function suggests that there might be a problem with the default export from a module, possibly due to incorrect usage of ES module syntax or a problem with the way the package is being transpiled or bundled for Deno. Since this advice is not based on the Deno documentation, please double-check the accuracy of the advice given. It might be helpful to look at the specific line of code in client.js that is causing the error and ensure that the import statements are correct and that the package is compatible with Deno. If the package is designed for Node.js and not Deno, you might encounter compatibility issues. Remember that Deno uses ES modules and does not support require() statements out of the box, which are common in Node.js modules. If you continue to experience issues, you may want to consider looking for alternative packages that are designed to work with Deno or reaching out to the maintainers of rpc-websockets for support.
marvinh.
marvinh.2mo ago
@platodev Can you file an issue for that?
platodev
platodev2mo ago
solved thanks how do I close this
marvinh.
marvinh.2mo ago
don't know if it's possible to close help threads here on discord