SyntaxError: Named export 'WebSocket' not found in ethers v6 #4971
Replies: 3 comments
-
It looks like you are trying to use How are you importing ethers into your project? If you are using commonjs, you should use it looks like you may be trying to import a path within ethers directly? |
Beta Was this translation helpful? Give feedback.
-
@ricmoo thank you for the answer! But I found out here: basically I had an |
Beta Was this translation helpful? Give feedback.
-
@ricmoo I celebrated too soon... the issue is still there, and it happens whenever I import any provider, for example:
my {
"extends": "./.svelte-kit/tsconfig.json",
"compilerOptions": {
"allowJs": true,
"checkJs": true,
"esModuleInterop": true,
"forceConsistentCasingInFileNames": true,
"resolveJsonModule": true,
"skipLibCheck": true,
"sourceMap": true,
"strict": true,
"types": ["node", "@types/dom-view-transitions"]
},
"exclude": ["src/frontend/src/tests/**/*"]
} I checked and my |
Beta Was this translation helpful? Give feedback.
-
I am not really sure if it is a bug or wrong settings on my side, but with ethers v6, when I use any class/object that relates to the WebSocket, there is an issue with imports:
I ran already a clean installation,
for info
"ethers": "^6.13.5"
Node 22.14
Beta Was this translation helpful? Give feedback.
All reactions