node.jsnpmnpm-installshare-button

npm Fetch Failed. Error Code 504


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


Solution

  • 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 :)