Skip to content
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

ens-normalize installation fails with npx #15

Closed
pablomendezroyo opened this issue May 23, 2023 · 13 comments
Closed

ens-normalize installation fails with npx #15

pablomendezroyo opened this issue May 23, 2023 · 13 comments

Comments

@pablomendezroyo
Copy link

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
Copy link

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
Copy link
Owner

adraffy commented May 25, 2023

Can you give me steps to reproduce this?

@anhtuan201192
Copy link

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
Copy link
Author

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
Copy link
Owner

adraffy commented May 26, 2023

Does 1.9.1 fix the issue?

@hmmdeif
Copy link

hmmdeif commented May 29, 2023

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
Copy link
Contributor

ricmoo commented May 30, 2023

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
Copy link

kirbyfly commented Jun 4, 2023

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

@ricmoo
Copy link
Contributor

ricmoo commented Jun 4, 2023

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
Copy link
Owner

adraffy commented Jun 8, 2023

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

@hmmdeif
Copy link

hmmdeif commented Jun 8, 2023

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

@kirbyfly
Copy link

kirbyfly commented Jun 9, 2023

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
Copy link
Contributor

ricmoo commented Jun 9, 2023

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

@adraffy adraffy closed this as completed Jul 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants