-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
@adraffy/ens-normalize resolution error #3848
Comments
Could it be related to RN? Are you using import (as opposed to require)? |
Ethers lib uses:
I'm importing it via require myself:
|
That is probably the problem. If you are using require, it should be using the My guess is there is something wrong with the bundler settings? It should be picking up the commonjs folder. What options does RN give for the bundler? Is there a way to tell it to use the |
Sorry I'm not actually using RN. Just Node/React. Using:
results in the same issue. |
What happens if you try to import |
Tried commenting out the following line from namehash.js:
and including it in my own codebase. Not sure if the new import is working as I am now seeing the following error from abi-coder.js which is also using ESM:
|
Oh! What version of node are you using? If it doesn’t support private members (properties that begin with a |
node -v |
That’s weird. It certainly shouldn’t be complaining about private members then. Actually, looking at your error, it is using Babel; not node. It looks like it is running some preprocessing step. How is the bundler/transpiler triggered? |
I'm just using the following and have installed ethers as an additional dependency as an alternative to web3.js: Error just throws after running npm start. |
It is definitely doing so strange extra things in the build target, if you look at the package.json. The error isn’t coming from ethers, it’s coming from Babel during it transpiring the modules. Can you find any docs regarding the build process? It is likely you need to add additional config to the package json (it has a bunch of extra fields in there for handling the custom build logic). |
It looks like it is using webpack internally: https://github.com/facebook/create-react-app/blob/main/packages/react-scripts/scripts/build.js#L143 |
Same error |
Hello guys! Same here Error:
Packages versions:node Import:
|
Thanks. I’m still trying to figure out how to reproduce this. Is there a simple webpack config you can provide that results in this error? |
We get this trying to upgrade ethers to v6 in Frame, using Parcel. |
Random question. After upgrading to ethers v6, did you re-run install? I'm trying out webpack (which seems the above systems use) and it seems to work. I'm trying everything I can think of to reproduce this... Any help is appreciated. |
(and can you verify there is a folder |
Just installed react-create-app, then added ethers last version. I have this package in node_modules |
Thanks. I’ll try that out. |
Exact same issue here. |
I definitely need som help reproducing this. I want to help, but I need more than "me too" replies. Here is what I've done:
To which I get a page with the name hash injected properly. Please let me know simple and complete reproduction steps. :) |
This comment was marked as spam.
This comment was marked as spam.
Maybe because we add react-app-rewired? |
Please keep in mind I have next to zero knowledge of react native, so I need more explanation of things like “react-app-rewired” and how I can exploit that to replicate the above error. :) |
I get into the same error, but when I try to downgrade to |
Thanks @goosewobbler! I can now reproduce the problem. Trying to figure out the issue now. :) |
The issues seems to be with how parcel applies So, in v6.2 I will switch to using the standards-compliant normalize included in the |
What about this problem? I get stuck by this problem too. It seems like the loader did not transpile ethers file.
|
This should be fixed in v6.2.0. Please try it out and let me know. :) |
Thanks @ricmoo, this fixed the problem for me using both I should probably raise a separate issue but now typescript complains about the
Any pointers on how to coax typescript into respecting that declaration? |
@tmpfs What is causing the type issue? That definitely shouldn’t cause any type issues as long as you aren’t including different minor versions within the same project… |
I had this issue while using jest. Solved it by adding the following: jest.config.js:
jest-transformer.js:
|
sorry to reopen old thread, i just installed ethers and have the associated error. im on node v14.20.1 if that matters :) i just did a fresh |
I'm finding this issue too, I think it has something to do with how npm is handling the nested dependency. If I install @adraffy/ens-normalize directly I get the dist folder. If I navigate to node_modules/ethers/node_modules/@adraffy/ens-normalise there is no dist folder. If I copy the dist folder from node_modules/@adraffy/ens-normalise to the path listed above I get past this issue (and on to the next issue in my migration from v5 lol). So, how do we force the @adraffy/ens-normalise within the ethers directory to get a dist folder and contents? |
Just noticed this issue is closed, will create a new one... |
yah, it works |
it works in v6.4.2. |
Ethers Version
6.0.8
Search Terms
No response
Describe the Problem
Just installed ethers, and can see @adraffy/ens-normalize@1.9.0 is installed via npm list, but it won't resolve in the ethers lib:
Not sure why this would be happening? Can't use ethers while it has this resolution issue.
Code Snippet
No response
Contract ABI
No response
Errors
Environment
node.js (v12 or newer), React
Environment (Other)
No response
The text was updated successfully, but these errors were encountered: