Replies: 9 comments
-
It’s definitely exported… Can you include the full error? Are you sure you are pulling in v6? |
Beta Was this translation helpful? Give feedback.
-
Thanks for the quick response! I see what you mean in the source. Sorry, not sure what you mean by "full error", that's all the error VS Code shows. Here's where I looked:
I looked in |
Beta Was this translation helpful? Give feedback.
-
The index.js includes an What happens if you try importing another type, like BigNumberish? I wonder if the VSCode linter doesn’t see exported types. Also, what version of TS’ linter are you using? I think there is a drop-down in the bottom right of VS Code; can you make sure it’s a recent version? I think I read somewhere a goal of newer TS is to get the VS Code linter to behave more like the compiler… |
Beta Was this translation helpful? Give feedback.
-
Importing I'm using latest VS Code and TypeScript, FWIW. |
Beta Was this translation helpful? Give feedback.
-
Also, I cannot find |
Beta Was this translation helpful? Give feedback.
-
That’s super strange that BigNumberish works, then. There won’t be a Signer in the lib.esm/.js or lib.commonjs/.js, because it’s a TypeScript type. It doesn’t exist outside of TypeScript (no JS code is generated for it). It shows up here and here for esm and commonjs respectively though. But can you verify the TS engine VS Code is using matches? It’s a dropdown in the bottom right corner and completely unrelated to the TypeScript you are actually using. I’ve seen weird things happen before when that mismatches. I have only used VS Code enough to help others debug things like this though; I am by no means an expert on all its configuration. |
Beta Was this translation helpful? Give feedback.
-
Sorry, I was looking in the wrong place for the export, you're quite right of course. I checked the version of TypeScript; VS Code was using 5.3.2, not the workspace's 5.3.3, but changing didn't help. But anyway, this indeed seems to be a problem with my setup, not Ethers; sorry for the noise. |
Beta Was this translation helpful? Give feedback.
-
No worries. If you find the solution, please post it here for the future peeps that have the same problem. I’m going to move this to discussions, but if there is a bug we can move it back. :) |
Beta Was this translation helpful? Give feedback.
-
All I can see is that |
Beta Was this translation helpful? Give feedback.
-
Ethers Version
6.11.1
Search Terms
Signer, import, export
Describe the Problem
gives VS Code warning: "Signer is not found in ethers".
If I import
AbstractSigner
instead, it is found.Code Snippet
No response
Contract ABI
No response
Errors
No response
Environment
node.js (v12 or newer), Hardhat
Environment (Other)
No response
Beta Was this translation helpful? Give feedback.
All reactions