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

Fix: rchain-did-resolver issue while installing node packages #1

Open
David405 opened this issue Jul 27, 2021 · 5 comments
Open

Fix: rchain-did-resolver issue while installing node packages #1

David405 opened this issue Jul 27, 2021 · 5 comments
Assignees
Labels
bug Something isn't working documentation Improvements or additions to documentation

Comments

@David405
Copy link
Collaborator

David405 commented Jul 27, 2021

I ran into some issues while installing node packages, after several repeated tries, I discovered that it usually stops while installing rchain-did-resolver.

ERROR:
Its throws an npm ERR! git dep preparation failed, and goes further to explain that the dependency tree is corrupted and a 404 error while trying to fetch rchain-did-resolver.

STEPS:
These are the steps I took to fix the problem;

  • $ npm cache clean --force
  • Delete node_modules by $ rm -rf node_modules also delete package-lock.json
  • Update the npm to the latest stable version
  • npm install
    - $ npm start

The above procedure gotten from here may solve the problem, in my case, it didn't solve the problem.

So I had to configure npm to increase to timeout while attempting to fetch a resource, this can either be done on the terminal or inside npm config file ./npmrc depending on the OS you are using. this and this should help.

I did mine on the terminal using $ npm config set fetch-retry-maxtimeout 240000 -g i.e I increased the timeout from 1 minute to 4 minutes.

Lastly, I added the --force and the --legacy-peer-dep so npm can ignore any errors in the dependency tree graph.

So the final command that ran successfully looked like this $ /home/${USER}/.nvm/versions/node/v15.5.1/bin/node /home/${USER}/.nvm/versions/node/v15.5.1/lib/node_modules/npm/bin/npm-cli.js install --cache=/home/${USER}/.npm/_cacache --prefer-offline=false --prefer-online=false --offline=false --no-progress --no-save --no-audit --force --legacy-peer-deps.

NOTE - You have to change the ${USER} directory to your own user directory, which should be the username of your computer.

Also, this was done in a Linux environment i.e Windows Subsystem for Linux v2, WSL2

@David405 David405 added bug Something isn't working documentation Improvements or additions to documentation good first issue labels Jul 27, 2021
@David405 David405 changed the title Fix: did-resolver issue while installing node packages Fix: rchain-did-resolver issue while installing node packages Jul 27, 2021
@Bill-Kunj
Copy link
Collaborator

@David405 is this specific to the rfm subdirectory?

@David405
Copy link
Collaborator Author

Yes, I believe it is since it occurs while installing node packages from the rfm subdirectory

@Bill-Kunj
Copy link
Collaborator

@David405 is this resolved with your latest npm build?

@David405
Copy link
Collaborator Author

David405 commented Aug 3, 2021

@David405 is this resolved with your latest npm build?

Yes, I used your snapshot and then rebuilt npm

@Bill-Kunj
Copy link
Collaborator

@David405 Please close this with your solution

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

2 participants