adraffy / ens-normalize.js

ENSIP-15 in JS
https://adraffy.github.io/ens-normalize.js/test/resolver.html
MIT License
63 stars 17 forks source link

ens-normalize installation fails with `npx` #15

Closed pablomendezroyo closed 12 months ago

pablomendezroyo commented 1 year ago

I have a CLI that has ethers as a dependency which has this ens-normalize as a sub-dependency. Running the cli with npx results in the following error

npx <cli tool> 

npm verb exit 1
npm verb unfinished npm timer reify 1684840339473
npm verb unfinished npm timer reify:unpack 1684840341873
npm verb unfinished npm timer reifyNode:node_modules/@adraffy/ens-normalize 1684840341880
npm verb code 1

Using it with npm i -g works without issues

anhtuan201192 commented 1 year ago

I have issue after remove node modules and reinstall

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

https://nextjs.org/docs/messages/module-not-found Import trace for requested module: ./node_modules/ethers/lib.esm/hash/index.js ./node_modules/ethers/lib.esm/ethers.js ./node_modules/ethers/lib.esm/index.js

adraffy commented 1 year ago

Can you give me steps to reproduce this?

anhtuan201192 commented 1 year ago

Can you give me steps to reproduce this? ethers v 6.3.0 and next js 13

  1. delete node modules and package-json.lock
  2. run [npm i] again
  3. run [npm run build] => display error
pablomendezroyo commented 1 year ago

Can you give me steps to reproduce this?

Sure!

npx -y --verbose  @dappnode/dappnodesdk@0.3.4 -v

npm http fetch GET 200 https://registry.npmjs.org/@dappnode/types/-/types-0.1.17.tgz 2526ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/@octokit/rest/-/rest-18.12.0.tgz 2532ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz 2599ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/figlet/-/figlet-1.6.0.tgz 2607ms (cache miss)
......
........   => common GET logs
npm verb exit 1
npm verb unfinished npm timer reify 1685000316910
npm verb unfinished npm timer reify:unpack 1685000344123
npm verb unfinished npm timer reifyNode:node_modules/@adraffy/ens-normalize 1685000344138
npm verb code 1
adraffy commented 1 year ago

Does 1.9.1 fix the issue?

hmmdeif commented 1 year ago

Seems to be due to ethers referencing a forked out of date version of this package. Using npm i @adraffy/ens-normalize will force download the correct repo.

ricmoo commented 1 year ago

I’m working on migrating to the new version, which should fix a lot of little issues that cropped up. I still have some testing to do though.

kirbyfly commented 1 year ago

https://github.com/kirbyfly/ethers.js/blob/main/package.json, seems to be working with your latest version. Tried it myself @ricmoo

ricmoo commented 1 year ago

Thanks! I will update the package.json and make sure all the CI for the various environments pass. @kirbyfly were you able to verify the env tests? As long as those pass, I’ll push it out once I’ve tested. :)

adraffy commented 1 year ago

Bumping this. I would also like input regarding if the latest changes fixed this issue.

hmmdeif commented 1 year ago

I retested my project by removing node_modules and downloading latest and yes this seems to be resolved now.

kirbyfly commented 1 year ago

It didn't pass the test on my repo, but not sure if that is related to the new package. It wasn't passing on the main repo either

ricmoo commented 1 year ago

Oh sorry, I forgot to get back in this issue. That latest version worked for me perfectly! Thanks for your quick turn around time. :)