In my node.js project I have "@raydium-io/raydium-sdk": "^1.3.1-beta.52" dependency, and it has this deps:
`-- @project-serum/serum@0.13.65
`-- @solana/web3.js@1.91.8
`-- rpc-websockets@7.11.1
When I try to do import { Connection } from '@solana/web3.js'
and run the thing I get this error:
[INFO] 20:49:10 ts-node-dev ver. 2.0.0 (using ts-node ver. 10.9.2, typescript ver. 5.4.5)
Error: Cannot find module 'rpc-websockets/dist/lib/client'
I dont understand whats the problem, probably something with module resolution, but I am not sure. I also checked and rpc-websockets are in the node_modules.
Any idea how to fix this?
Solved by explicitly stating "rpc-websockets": "7.11.0" in dependencies. It seems like latest version 7.11.0 is not compatible.