npm install ws doesn't work












0















I want to implement a websocket server in node.js. For that I want to install 'ws'. I've already installed npm and node.js in my ubuntu system. Now I'm trying to run the command 'sudo npm install ws' but it doesn't work. I'm pasting the content of my terminal. Can someone help?



root@Neeraj:/home/neeraj# npm install ws
npm http GET https://registry.npmjs.org/ws

npm ERR! Error: failed to fetch from registry: ws
npm ERR! at /usr/share/npm/lib/utils/npm-registry-client/get.js:139:12
npm ERR! at cb (/usr/share/npm/lib/utils/npm-registry-client/request.js:31:9)
npm ERR! at Request._callback (/usr/share/npm/lib/utils/npm-registry- client/request.js:136:18)
npm ERR! at Request.callback (/usr/lib/nodejs/request/main.js:119:22)
npm ERR! at Request.<anonymous> (/usr/lib/nodejs/request/main.js:212:58)
npm ERR! at Request.emit (events.js:88:20)
npm ERR! at ClientRequest.<anonymous> (/usr/lib/nodejs/request/main.js:209:10)
npm ERR! at ClientRequest.emit (events.js:67:17)
npm ERR! at ClientRequest.onError (/usr/lib/nodejs/request/tunnel.js:164:21)
npm ERR! at ClientRequest.g (events.js:156:14)
npm ERR! You may report this log at:
npm ERR! <http://bugs.debian.org/npm>
npm ERR! or use
npm ERR! reportbug --attach /home/neeraj/npm-debug.log npm
npm ERR!
npm ERR! System Linux 3.2.0-29-generic-pae
npm ERR! command "node" "/usr/bin/npm" "install" "ws"
npm ERR! cwd /home/neeraj
npm ERR! node -v v0.6.12
npm ERR! npm -v 1.1.4
npm ERR! message failed to fetch from registry: ws
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /home/neeraj/npm-debug.log
npm not ok
root@Neeraj:/home/neeraj#









share|improve this question



























    0















    I want to implement a websocket server in node.js. For that I want to install 'ws'. I've already installed npm and node.js in my ubuntu system. Now I'm trying to run the command 'sudo npm install ws' but it doesn't work. I'm pasting the content of my terminal. Can someone help?



    root@Neeraj:/home/neeraj# npm install ws
    npm http GET https://registry.npmjs.org/ws

    npm ERR! Error: failed to fetch from registry: ws
    npm ERR! at /usr/share/npm/lib/utils/npm-registry-client/get.js:139:12
    npm ERR! at cb (/usr/share/npm/lib/utils/npm-registry-client/request.js:31:9)
    npm ERR! at Request._callback (/usr/share/npm/lib/utils/npm-registry- client/request.js:136:18)
    npm ERR! at Request.callback (/usr/lib/nodejs/request/main.js:119:22)
    npm ERR! at Request.<anonymous> (/usr/lib/nodejs/request/main.js:212:58)
    npm ERR! at Request.emit (events.js:88:20)
    npm ERR! at ClientRequest.<anonymous> (/usr/lib/nodejs/request/main.js:209:10)
    npm ERR! at ClientRequest.emit (events.js:67:17)
    npm ERR! at ClientRequest.onError (/usr/lib/nodejs/request/tunnel.js:164:21)
    npm ERR! at ClientRequest.g (events.js:156:14)
    npm ERR! You may report this log at:
    npm ERR! <http://bugs.debian.org/npm>
    npm ERR! or use
    npm ERR! reportbug --attach /home/neeraj/npm-debug.log npm
    npm ERR!
    npm ERR! System Linux 3.2.0-29-generic-pae
    npm ERR! command "node" "/usr/bin/npm" "install" "ws"
    npm ERR! cwd /home/neeraj
    npm ERR! node -v v0.6.12
    npm ERR! npm -v 1.1.4
    npm ERR! message failed to fetch from registry: ws
    npm ERR!
    npm ERR! Additional logging details can be found in:
    npm ERR! /home/neeraj/npm-debug.log
    npm not ok
    root@Neeraj:/home/neeraj#









    share|improve this question

























      0












      0








      0








      I want to implement a websocket server in node.js. For that I want to install 'ws'. I've already installed npm and node.js in my ubuntu system. Now I'm trying to run the command 'sudo npm install ws' but it doesn't work. I'm pasting the content of my terminal. Can someone help?



      root@Neeraj:/home/neeraj# npm install ws
      npm http GET https://registry.npmjs.org/ws

      npm ERR! Error: failed to fetch from registry: ws
      npm ERR! at /usr/share/npm/lib/utils/npm-registry-client/get.js:139:12
      npm ERR! at cb (/usr/share/npm/lib/utils/npm-registry-client/request.js:31:9)
      npm ERR! at Request._callback (/usr/share/npm/lib/utils/npm-registry- client/request.js:136:18)
      npm ERR! at Request.callback (/usr/lib/nodejs/request/main.js:119:22)
      npm ERR! at Request.<anonymous> (/usr/lib/nodejs/request/main.js:212:58)
      npm ERR! at Request.emit (events.js:88:20)
      npm ERR! at ClientRequest.<anonymous> (/usr/lib/nodejs/request/main.js:209:10)
      npm ERR! at ClientRequest.emit (events.js:67:17)
      npm ERR! at ClientRequest.onError (/usr/lib/nodejs/request/tunnel.js:164:21)
      npm ERR! at ClientRequest.g (events.js:156:14)
      npm ERR! You may report this log at:
      npm ERR! <http://bugs.debian.org/npm>
      npm ERR! or use
      npm ERR! reportbug --attach /home/neeraj/npm-debug.log npm
      npm ERR!
      npm ERR! System Linux 3.2.0-29-generic-pae
      npm ERR! command "node" "/usr/bin/npm" "install" "ws"
      npm ERR! cwd /home/neeraj
      npm ERR! node -v v0.6.12
      npm ERR! npm -v 1.1.4
      npm ERR! message failed to fetch from registry: ws
      npm ERR!
      npm ERR! Additional logging details can be found in:
      npm ERR! /home/neeraj/npm-debug.log
      npm not ok
      root@Neeraj:/home/neeraj#









      share|improve this question














      I want to implement a websocket server in node.js. For that I want to install 'ws'. I've already installed npm and node.js in my ubuntu system. Now I'm trying to run the command 'sudo npm install ws' but it doesn't work. I'm pasting the content of my terminal. Can someone help?



      root@Neeraj:/home/neeraj# npm install ws
      npm http GET https://registry.npmjs.org/ws

      npm ERR! Error: failed to fetch from registry: ws
      npm ERR! at /usr/share/npm/lib/utils/npm-registry-client/get.js:139:12
      npm ERR! at cb (/usr/share/npm/lib/utils/npm-registry-client/request.js:31:9)
      npm ERR! at Request._callback (/usr/share/npm/lib/utils/npm-registry- client/request.js:136:18)
      npm ERR! at Request.callback (/usr/lib/nodejs/request/main.js:119:22)
      npm ERR! at Request.<anonymous> (/usr/lib/nodejs/request/main.js:212:58)
      npm ERR! at Request.emit (events.js:88:20)
      npm ERR! at ClientRequest.<anonymous> (/usr/lib/nodejs/request/main.js:209:10)
      npm ERR! at ClientRequest.emit (events.js:67:17)
      npm ERR! at ClientRequest.onError (/usr/lib/nodejs/request/tunnel.js:164:21)
      npm ERR! at ClientRequest.g (events.js:156:14)
      npm ERR! You may report this log at:
      npm ERR! <http://bugs.debian.org/npm>
      npm ERR! or use
      npm ERR! reportbug --attach /home/neeraj/npm-debug.log npm
      npm ERR!
      npm ERR! System Linux 3.2.0-29-generic-pae
      npm ERR! command "node" "/usr/bin/npm" "install" "ws"
      npm ERR! cwd /home/neeraj
      npm ERR! node -v v0.6.12
      npm ERR! npm -v 1.1.4
      npm ERR! message failed to fetch from registry: ws
      npm ERR!
      npm ERR! Additional logging details can be found in:
      npm ERR! /home/neeraj/npm-debug.log
      npm not ok
      root@Neeraj:/home/neeraj#






      installation






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked May 10 '13 at 20:11









      ndhndh

      112




      112






















          1 Answer
          1






          active

          oldest

          votes


















          0














          This post solved my problem, as easy as establishing the npm registry with



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


          Anyway, thanks!






          share|improve this answer

























            Your Answer








            StackExchange.ready(function() {
            var channelOptions = {
            tags: "".split(" "),
            id: "89"
            };
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function() {
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled) {
            StackExchange.using("snippets", function() {
            createEditor();
            });
            }
            else {
            createEditor();
            }
            });

            function createEditor() {
            StackExchange.prepareEditor({
            heartbeatType: 'answer',
            autoActivateHeartbeat: false,
            convertImagesToLinks: true,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: 10,
            bindNavPrevention: true,
            postfix: "",
            imageUploader: {
            brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
            contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
            allowUrls: true
            },
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            });


            }
            });














            draft saved

            draft discarded


















            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f293683%2fnpm-install-ws-doesnt-work%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown

























            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            0














            This post solved my problem, as easy as establishing the npm registry with



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


            Anyway, thanks!






            share|improve this answer






























              0














              This post solved my problem, as easy as establishing the npm registry with



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


              Anyway, thanks!






              share|improve this answer




























                0












                0








                0







                This post solved my problem, as easy as establishing the npm registry with



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


                Anyway, thanks!






                share|improve this answer















                This post solved my problem, as easy as establishing the npm registry with



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


                Anyway, thanks!







                share|improve this answer














                share|improve this answer



                share|improve this answer








                edited May 23 '17 at 12:39









                Community

                1




                1










                answered Mar 19 '14 at 9:58









                liberaticliberatic

                1




                1






























                    draft saved

                    draft discarded




















































                    Thanks for contributing an answer to Ask Ubuntu!


                    • Please be sure to answer the question. Provide details and share your research!

                    But avoid



                    • Asking for help, clarification, or responding to other answers.

                    • Making statements based on opinion; back them up with references or personal experience.


                    To learn more, see our tips on writing great answers.




                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function () {
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f293683%2fnpm-install-ws-doesnt-work%23new-answer', 'question_page');
                    }
                    );

                    Post as a guest















                    Required, but never shown





















































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown

































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown







                    Popular posts from this blog

                    Human spaceflight

                    Can not write log (Is /dev/pts mounted?) - openpty in Ubuntu-on-Windows?

                    File:DeusFollowingSea.jpg