rchain / rpublishing

Other
1 stars 5 forks source link

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

Open David405 opened 3 years ago

David405 commented 3 years ago

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;

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

Bill-Kunj commented 3 years ago

@David405 is this specific to the rfm subdirectory?

David405 commented 3 years ago

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

Bill-Kunj commented 3 years ago

@David405 is this resolved with your latest npm build?

David405 commented 3 years ago

@David405 is this resolved with your latest npm build?

Yes, I used your snapshot and then rebuilt npm

Bill-Kunj commented 3 years ago

@David405 Please close this with your solution