TypeError: ethers.WebSocketProvider is not a constructor #4458
Answered
by
ricmoo
pixelpawnshop
asked this question in
Q&A
-
Hello ethers community Im new here I hope you can help me out on this one. I try to websocket stream events using WebSocketProvider. This is my code:
Works perfectly fine on newest ethers version but I would like to use 5.7.2. I get this error though when trying to execute on the mentioned version: TypeError: ethers.WebSocketProvider is not a constructor I appreciate any help thanks! |
Beta Was this translation helpful? Give feedback.
Answered by
ricmoo
Nov 6, 2023
Replies: 1 comment 1 reply
-
In v5, you need to use |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
pixelpawnshop
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
In v5, you need to use
new ethers.providers.WebSocketProvider
, since it was a monorepo, it required anchors on the root ethers object.