ethers.js: @adraffy/ens-normalize resolution error

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:

Failed to compile.

./node_modules/ethers/lib.esm/hash/namehash.js
Module not found: Can't resolve '@adraffy/ens-normalize' in '/Users/..../node_modules/ethers/lib.esm/hash'

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

Failed to compile.

./node_modules/ethers/lib.esm/hash/namehash.js
Module not found: Can't resolve '@adraffy/ens-normalize' in '/Users/..../node_modules/ethers/lib.esm/hash'

Environment

node.js (v12 or newer), React

Environment (Other)

No response

About this issue

  • Original URL
  • State: closed
  • Created a year ago
  • Reactions: 2
  • Comments: 39 (17 by maintainers)

Commits related to this issue

Most upvoted comments

I get into the same error, but when I try to downgrade to npm install ethers@5 it works fine for me.

it works in v6.4.2.

The issues seems to be with how parcel applies browser overrides. I have been debating removing the xnf version of the ens_normalize; it saves a bit on bundle size, but places ENS resolution at the mercy of browser normalize, which has spotty standards-compliance.

So, in v6.2 I will switch to using the standards-compliant normalize included in the @adraffy/ens-normalize module, which should get rid of this error and improve standards-compliance for funky ENS names. 😃

I get into the same error, but when I try to downgrade to npm install ethers@5 it works fine for me.

yah, it works thnks

@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…