2

I'm trying to implement this plugin called Share Button from npm my running https://github.com/carrot/share-button. However after doing that and waiting around 5mins I get the following output:

npm ERR! fetch failed https://registry.npmjs.org/i/-/i-0.3.2.tgz
npm WARN retry will retry, error on last attempt: Error: fetch failed with status code 504
⸨    ░░░░░░░░░░░░░░⸩ ⠇ fetchMetadata: WARN retry will retry, error on last attempt: Error: fetch failed with status code 504

Does anyone know why this would happen and a way to get round it? Thanks

E_net4
  • 27,810
  • 13
  • 101
  • 139

3 Answers3

3

If you tried

npm i --save-dev share-button

like me. Try using the github repo like that

npm install --save-dev carrot/share-button

That works without an error on my machine :)

code1x1.de
  • 304
  • 2
  • 13
  • Yes! It works! Congratulations :) Now, why do you have to write the carrot/ in front? Their documentation doesn't even specify that? –  Jul 29 '16 at 13:12
  • Its the github url. You can always use 'npm install githubname/reponame' if it is from a github repo. Just type 'npm help install' for the npm documentation. They can expain it better :) – code1x1.de Jul 29 '16 at 14:30
1

Try to execute the command below:

npm config set registry http://registry.npmjs.org/

That will get packages npm install over HTTP.

Dimitry Ivanov
  • 213
  • 2
  • 4
  • Thanks, though I'm still getting the same error. It's just hanging there. –  Jul 19 '16 at 11:21
0

Sometimes you also get a 504 error if you have an incompatible npm version.

npm install -g npm@6.13.4

The npm versions v3, v6 and v8 are partly incompatible. So just try to install a different npm version.

Robin
  • 66
  • 1
  • 1
  • 9