How to install npm in alpine linux Announcing the arrival of Valued Associate #679: Cesar...

I'm having difficulty getting my players to do stuff in a sandbox campaign

How to rotate it perfectly?

Why does this iterative way of solving of equation work?

Can I throw a longsword at someone?

Can a zero nonce be safely used with AES-GCM if the key is random and never used again?

How does modal jazz use chord progressions?

Jazz greats knew nothing of modes. Why are they used to improvise on standards?

How should I respond to a player wanting to catch a sword between their hands?

Replacing HDD with SSD; what about non-APFS/APFS?

Do we know why communications with Beresheet and NASA were lost during the attempted landing of the Moon lander?

Stop battery usage [Ubuntu 18]

Array/tabular for long multiplication

Geometric mean and geometric standard deviation

I'm thinking of a number

How can I make names more distinctive without making them longer?

Was credit for the black hole image misattributed?

How do you clear the ApexPages.getMessages() collection in a test?

Classification of bundles, Postnikov towers, obstruction theory, local coefficients

What is the electric potential inside a point charge?

What do you call a plan that's an alternative plan in case your initial plan fails?

Why is there no army of Iron-Mans in the MCU?

Why don't the Weasley twins use magic outside of school if the Trace can only find the location of spells cast?

3 doors, three guards, one stone

Active filter with series inductor and resistor - do these exist?



How to install npm in alpine linux



Announcing the arrival of Valued Associate #679: Cesar Manara
Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern)What is the best way to install latest nodejs with npm on alpine linuxInstall whereis command on alpine linuxHow to install specific version of libxml2 on Alpine linux without downgrade of whole alpine to v3.1?What is the best way to install latest nodejs with npm on alpine linux/proc/version(Alpine Linux Distribution)How to install vlc-nox equivalent on Alpine linuxInstall Alpine Linux in a specific partitionAlpine Linux acf login not workingHow to install Chromium masked package on Alpine Linux 3.8?Can't install NPM in Alpine Linux, although it's present in reposHow do I run pstree on alpine linux?





.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ height:90px;width:728px;box-sizing:border-box;
}







47















So I can't get to install npm in alpine linux. I thought perhaps I can just do a apk add npm but apparently apk search npm returns nothing, even after a apk update. I'm experimenting with all this from the nginx:alpine docker image, i.e. docker run -it nginx:alpine /bin/sh



Edit 1: I can see how the nodejs:alpine dockerfile builds node, but I don't understand how it builds npm



Edit 2: now that I know that npm gets installed with nodejs on alpine, and just for clarification, the reason this wasn't evident to me at first is that on ubuntu 14.04 a sudo apt-get install nodejs would still require a sudo apt-get install npm (which installs development packages e.g. gcc)










share|improve this question































    47















    So I can't get to install npm in alpine linux. I thought perhaps I can just do a apk add npm but apparently apk search npm returns nothing, even after a apk update. I'm experimenting with all this from the nginx:alpine docker image, i.e. docker run -it nginx:alpine /bin/sh



    Edit 1: I can see how the nodejs:alpine dockerfile builds node, but I don't understand how it builds npm



    Edit 2: now that I know that npm gets installed with nodejs on alpine, and just for clarification, the reason this wasn't evident to me at first is that on ubuntu 14.04 a sudo apt-get install nodejs would still require a sudo apt-get install npm (which installs development packages e.g. gcc)










    share|improve this question



























      47












      47








      47


      11






      So I can't get to install npm in alpine linux. I thought perhaps I can just do a apk add npm but apparently apk search npm returns nothing, even after a apk update. I'm experimenting with all this from the nginx:alpine docker image, i.e. docker run -it nginx:alpine /bin/sh



      Edit 1: I can see how the nodejs:alpine dockerfile builds node, but I don't understand how it builds npm



      Edit 2: now that I know that npm gets installed with nodejs on alpine, and just for clarification, the reason this wasn't evident to me at first is that on ubuntu 14.04 a sudo apt-get install nodejs would still require a sudo apt-get install npm (which installs development packages e.g. gcc)










      share|improve this question
















      So I can't get to install npm in alpine linux. I thought perhaps I can just do a apk add npm but apparently apk search npm returns nothing, even after a apk update. I'm experimenting with all this from the nginx:alpine docker image, i.e. docker run -it nginx:alpine /bin/sh



      Edit 1: I can see how the nodejs:alpine dockerfile builds node, but I don't understand how it builds npm



      Edit 2: now that I know that npm gets installed with nodejs on alpine, and just for clarification, the reason this wasn't evident to me at first is that on ubuntu 14.04 a sudo apt-get install nodejs would still require a sudo apt-get install npm (which installs development packages e.g. gcc)







      linux alpine-linux






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Jan 9 '17 at 3:40







      shadi

















      asked Sep 19 '16 at 15:20









      shadishadi

      355149




      355149






















          6 Answers
          6






          active

          oldest

          votes


















          26














          I could be wrong, but I think npm is actually a dependency of nodejs.



          I've never seen any flavor of package manager install npm alone. Always seems to come packaged with yum install nodejs, or apt-get install nodejs, or apk add --update nodejs.






          share|improve this answer





















          • 1





            Welcome to Super User. I have no idea whether you're right, but just some quick feedback. Answers are intended to be definitive solutions. With a little more rep, you can post a comment with a helpful guess. For an answer post, research it first, so you're sure of the information, then post. And you can then cite a reference, which makes an even better answer.

            – fixer1234
            Dec 30 '16 at 21:51






          • 13





            this is no longer accepted, as apk does not installs npm by default when installing nodejs

            – Panthro
            Aug 12 '17 at 22:52











          • upvoted just because nobody provided a better answer

            – Alexander Mills
            Aug 31 '17 at 1:01











          • I believe it is 'apk add --update nodejs-npm' for Alpine 3.6+

            – Ali Cheaito
            Feb 13 at 15:14



















          148














          I had an issue with the apk manager.



          The package nodejs is no longer installing NPM (see pkgs.alpinelinux.org)
          You have to install nodejs-npm



          apk add --update nodejs nodejs-npm





          share|improve this answer


























          • I do not understand it. Npm should be the core dependency of node, npm install npm@latest might be impacted by the node version itself so they would not be compatible...

            – dmi3y
            May 30 '17 at 19:47








          • 4





            This should be the accepted answer with the latest alpine image. npm was not installed for me with just nodejs

            – kevinc
            Jul 29 '17 at 15:35











          • Agreed, this is normally a dependency, but if you're installing nodejs manually (I was installing it from the 'edge' repo as well because as of now 6.7 is deprecated) then you need to install nodejs-npm separately Here's what I ran: apk add nodejs=6.11.2-r0 nodejs-npm=6.11.2-r0 --update-cache --repository dl-cdn.alpinelinux.org/alpine/edge/main --allow-untrusted

            – Anton Babushkin
            Aug 22 '17 at 23:53








          • 4





            Side question: while this answer works just fine, I can't seem to find nodejs-npm on pkgs.alpinelinux.org/packages. There is npm package which also does the job. Is it some kind of alias?

            – Tad Lispy
            Jul 25 '18 at 14:28



















          8














          apk update && apk add nodejs installed the npm binary for me.






          share|improve this answer
























          • not anymore....

            – Panthro
            Aug 12 '17 at 22:50






          • 1





            Upvoted. Still works

            – bholagabbar
            Sep 13 '17 at 16:45











          • Disputing if something works should include versions of things...

            – Eric Swanson
            Jan 3 at 22:00



















          4














          The issue here is a recent one and is due to changes in Alpine's package repositories between v3.5 and v3.6 or edge.



          In v3.5 nodejs included npm
          In v3.6 nodesjs does not include npm and the new nodejs-npm package exists.



          See here for Alpine packages.
          To see what version of packages you are pulling from look at the contents of /etc/apk/repositories






          share|improve this answer































            1














            For the recent versions of Alpine (v3.8+) the correct way to install nodejs with
            npm is:



            apk add --update nodejs npm



            However, npm package depends on nodejs, so you can do:



            apk add --update npm



            Note: since Alpine 3.8 there is no nodejs-npm package.






            share|improve this answer








            New contributor




            Ruslan Isay is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
            Check out our Code of Conduct.




























              0














              npm comes hand in hand with nodejs.
              In the case you cant install node with apk add nodejs, you need fix that first.
              Step 1 - do you have the community repo added to your /etc/apk/repositories list? If not, it is very useful to do so. Further details: https://wiki.alpinelinux.org/wiki/Enable_Community_Repository






              share|improve this answer



















              • 3





                Can you explain the down vote?

                – vizmi
                Sep 20 '17 at 4:20












              Your Answer








              StackExchange.ready(function() {
              var channelOptions = {
              tags: "".split(" "),
              id: "3"
              };
              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%2fsuperuser.com%2fquestions%2f1125969%2fhow-to-install-npm-in-alpine-linux%23new-answer', 'question_page');
              }
              );

              Post as a guest















              Required, but never shown

























              6 Answers
              6






              active

              oldest

              votes








              6 Answers
              6






              active

              oldest

              votes









              active

              oldest

              votes






              active

              oldest

              votes









              26














              I could be wrong, but I think npm is actually a dependency of nodejs.



              I've never seen any flavor of package manager install npm alone. Always seems to come packaged with yum install nodejs, or apt-get install nodejs, or apk add --update nodejs.






              share|improve this answer





















              • 1





                Welcome to Super User. I have no idea whether you're right, but just some quick feedback. Answers are intended to be definitive solutions. With a little more rep, you can post a comment with a helpful guess. For an answer post, research it first, so you're sure of the information, then post. And you can then cite a reference, which makes an even better answer.

                – fixer1234
                Dec 30 '16 at 21:51






              • 13





                this is no longer accepted, as apk does not installs npm by default when installing nodejs

                – Panthro
                Aug 12 '17 at 22:52











              • upvoted just because nobody provided a better answer

                – Alexander Mills
                Aug 31 '17 at 1:01











              • I believe it is 'apk add --update nodejs-npm' for Alpine 3.6+

                – Ali Cheaito
                Feb 13 at 15:14
















              26














              I could be wrong, but I think npm is actually a dependency of nodejs.



              I've never seen any flavor of package manager install npm alone. Always seems to come packaged with yum install nodejs, or apt-get install nodejs, or apk add --update nodejs.






              share|improve this answer





















              • 1





                Welcome to Super User. I have no idea whether you're right, but just some quick feedback. Answers are intended to be definitive solutions. With a little more rep, you can post a comment with a helpful guess. For an answer post, research it first, so you're sure of the information, then post. And you can then cite a reference, which makes an even better answer.

                – fixer1234
                Dec 30 '16 at 21:51






              • 13





                this is no longer accepted, as apk does not installs npm by default when installing nodejs

                – Panthro
                Aug 12 '17 at 22:52











              • upvoted just because nobody provided a better answer

                – Alexander Mills
                Aug 31 '17 at 1:01











              • I believe it is 'apk add --update nodejs-npm' for Alpine 3.6+

                – Ali Cheaito
                Feb 13 at 15:14














              26












              26








              26







              I could be wrong, but I think npm is actually a dependency of nodejs.



              I've never seen any flavor of package manager install npm alone. Always seems to come packaged with yum install nodejs, or apt-get install nodejs, or apk add --update nodejs.






              share|improve this answer















              I could be wrong, but I think npm is actually a dependency of nodejs.



              I've never seen any flavor of package manager install npm alone. Always seems to come packaged with yum install nodejs, or apt-get install nodejs, or apk add --update nodejs.







              share|improve this answer














              share|improve this answer



              share|improve this answer








              edited Dec 30 '16 at 21:01









              Kamil Maciorowski

              29.2k156288




              29.2k156288










              answered Dec 30 '16 at 20:50









              Joseph RobertsJoseph Roberts

              39243




              39243








              • 1





                Welcome to Super User. I have no idea whether you're right, but just some quick feedback. Answers are intended to be definitive solutions. With a little more rep, you can post a comment with a helpful guess. For an answer post, research it first, so you're sure of the information, then post. And you can then cite a reference, which makes an even better answer.

                – fixer1234
                Dec 30 '16 at 21:51






              • 13





                this is no longer accepted, as apk does not installs npm by default when installing nodejs

                – Panthro
                Aug 12 '17 at 22:52











              • upvoted just because nobody provided a better answer

                – Alexander Mills
                Aug 31 '17 at 1:01











              • I believe it is 'apk add --update nodejs-npm' for Alpine 3.6+

                – Ali Cheaito
                Feb 13 at 15:14














              • 1





                Welcome to Super User. I have no idea whether you're right, but just some quick feedback. Answers are intended to be definitive solutions. With a little more rep, you can post a comment with a helpful guess. For an answer post, research it first, so you're sure of the information, then post. And you can then cite a reference, which makes an even better answer.

                – fixer1234
                Dec 30 '16 at 21:51






              • 13





                this is no longer accepted, as apk does not installs npm by default when installing nodejs

                – Panthro
                Aug 12 '17 at 22:52











              • upvoted just because nobody provided a better answer

                – Alexander Mills
                Aug 31 '17 at 1:01











              • I believe it is 'apk add --update nodejs-npm' for Alpine 3.6+

                – Ali Cheaito
                Feb 13 at 15:14








              1




              1





              Welcome to Super User. I have no idea whether you're right, but just some quick feedback. Answers are intended to be definitive solutions. With a little more rep, you can post a comment with a helpful guess. For an answer post, research it first, so you're sure of the information, then post. And you can then cite a reference, which makes an even better answer.

              – fixer1234
              Dec 30 '16 at 21:51





              Welcome to Super User. I have no idea whether you're right, but just some quick feedback. Answers are intended to be definitive solutions. With a little more rep, you can post a comment with a helpful guess. For an answer post, research it first, so you're sure of the information, then post. And you can then cite a reference, which makes an even better answer.

              – fixer1234
              Dec 30 '16 at 21:51




              13




              13





              this is no longer accepted, as apk does not installs npm by default when installing nodejs

              – Panthro
              Aug 12 '17 at 22:52





              this is no longer accepted, as apk does not installs npm by default when installing nodejs

              – Panthro
              Aug 12 '17 at 22:52













              upvoted just because nobody provided a better answer

              – Alexander Mills
              Aug 31 '17 at 1:01





              upvoted just because nobody provided a better answer

              – Alexander Mills
              Aug 31 '17 at 1:01













              I believe it is 'apk add --update nodejs-npm' for Alpine 3.6+

              – Ali Cheaito
              Feb 13 at 15:14





              I believe it is 'apk add --update nodejs-npm' for Alpine 3.6+

              – Ali Cheaito
              Feb 13 at 15:14













              148














              I had an issue with the apk manager.



              The package nodejs is no longer installing NPM (see pkgs.alpinelinux.org)
              You have to install nodejs-npm



              apk add --update nodejs nodejs-npm





              share|improve this answer


























              • I do not understand it. Npm should be the core dependency of node, npm install npm@latest might be impacted by the node version itself so they would not be compatible...

                – dmi3y
                May 30 '17 at 19:47








              • 4





                This should be the accepted answer with the latest alpine image. npm was not installed for me with just nodejs

                – kevinc
                Jul 29 '17 at 15:35











              • Agreed, this is normally a dependency, but if you're installing nodejs manually (I was installing it from the 'edge' repo as well because as of now 6.7 is deprecated) then you need to install nodejs-npm separately Here's what I ran: apk add nodejs=6.11.2-r0 nodejs-npm=6.11.2-r0 --update-cache --repository dl-cdn.alpinelinux.org/alpine/edge/main --allow-untrusted

                – Anton Babushkin
                Aug 22 '17 at 23:53








              • 4





                Side question: while this answer works just fine, I can't seem to find nodejs-npm on pkgs.alpinelinux.org/packages. There is npm package which also does the job. Is it some kind of alias?

                – Tad Lispy
                Jul 25 '18 at 14:28
















              148














              I had an issue with the apk manager.



              The package nodejs is no longer installing NPM (see pkgs.alpinelinux.org)
              You have to install nodejs-npm



              apk add --update nodejs nodejs-npm





              share|improve this answer


























              • I do not understand it. Npm should be the core dependency of node, npm install npm@latest might be impacted by the node version itself so they would not be compatible...

                – dmi3y
                May 30 '17 at 19:47








              • 4





                This should be the accepted answer with the latest alpine image. npm was not installed for me with just nodejs

                – kevinc
                Jul 29 '17 at 15:35











              • Agreed, this is normally a dependency, but if you're installing nodejs manually (I was installing it from the 'edge' repo as well because as of now 6.7 is deprecated) then you need to install nodejs-npm separately Here's what I ran: apk add nodejs=6.11.2-r0 nodejs-npm=6.11.2-r0 --update-cache --repository dl-cdn.alpinelinux.org/alpine/edge/main --allow-untrusted

                – Anton Babushkin
                Aug 22 '17 at 23:53








              • 4





                Side question: while this answer works just fine, I can't seem to find nodejs-npm on pkgs.alpinelinux.org/packages. There is npm package which also does the job. Is it some kind of alias?

                – Tad Lispy
                Jul 25 '18 at 14:28














              148












              148








              148







              I had an issue with the apk manager.



              The package nodejs is no longer installing NPM (see pkgs.alpinelinux.org)
              You have to install nodejs-npm



              apk add --update nodejs nodejs-npm





              share|improve this answer















              I had an issue with the apk manager.



              The package nodejs is no longer installing NPM (see pkgs.alpinelinux.org)
              You have to install nodejs-npm



              apk add --update nodejs nodejs-npm






              share|improve this answer














              share|improve this answer



              share|improve this answer








              edited Aug 13 '17 at 9:03









              Panthro

              1033




              1033










              answered Mar 10 '17 at 10:40









              Faisal HUSSAINFaisal HUSSAIN

              1,581242




              1,581242













              • I do not understand it. Npm should be the core dependency of node, npm install npm@latest might be impacted by the node version itself so they would not be compatible...

                – dmi3y
                May 30 '17 at 19:47








              • 4





                This should be the accepted answer with the latest alpine image. npm was not installed for me with just nodejs

                – kevinc
                Jul 29 '17 at 15:35











              • Agreed, this is normally a dependency, but if you're installing nodejs manually (I was installing it from the 'edge' repo as well because as of now 6.7 is deprecated) then you need to install nodejs-npm separately Here's what I ran: apk add nodejs=6.11.2-r0 nodejs-npm=6.11.2-r0 --update-cache --repository dl-cdn.alpinelinux.org/alpine/edge/main --allow-untrusted

                – Anton Babushkin
                Aug 22 '17 at 23:53








              • 4





                Side question: while this answer works just fine, I can't seem to find nodejs-npm on pkgs.alpinelinux.org/packages. There is npm package which also does the job. Is it some kind of alias?

                – Tad Lispy
                Jul 25 '18 at 14:28



















              • I do not understand it. Npm should be the core dependency of node, npm install npm@latest might be impacted by the node version itself so they would not be compatible...

                – dmi3y
                May 30 '17 at 19:47








              • 4





                This should be the accepted answer with the latest alpine image. npm was not installed for me with just nodejs

                – kevinc
                Jul 29 '17 at 15:35











              • Agreed, this is normally a dependency, but if you're installing nodejs manually (I was installing it from the 'edge' repo as well because as of now 6.7 is deprecated) then you need to install nodejs-npm separately Here's what I ran: apk add nodejs=6.11.2-r0 nodejs-npm=6.11.2-r0 --update-cache --repository dl-cdn.alpinelinux.org/alpine/edge/main --allow-untrusted

                – Anton Babushkin
                Aug 22 '17 at 23:53








              • 4





                Side question: while this answer works just fine, I can't seem to find nodejs-npm on pkgs.alpinelinux.org/packages. There is npm package which also does the job. Is it some kind of alias?

                – Tad Lispy
                Jul 25 '18 at 14:28

















              I do not understand it. Npm should be the core dependency of node, npm install npm@latest might be impacted by the node version itself so they would not be compatible...

              – dmi3y
              May 30 '17 at 19:47







              I do not understand it. Npm should be the core dependency of node, npm install npm@latest might be impacted by the node version itself so they would not be compatible...

              – dmi3y
              May 30 '17 at 19:47






              4




              4





              This should be the accepted answer with the latest alpine image. npm was not installed for me with just nodejs

              – kevinc
              Jul 29 '17 at 15:35





              This should be the accepted answer with the latest alpine image. npm was not installed for me with just nodejs

              – kevinc
              Jul 29 '17 at 15:35













              Agreed, this is normally a dependency, but if you're installing nodejs manually (I was installing it from the 'edge' repo as well because as of now 6.7 is deprecated) then you need to install nodejs-npm separately Here's what I ran: apk add nodejs=6.11.2-r0 nodejs-npm=6.11.2-r0 --update-cache --repository dl-cdn.alpinelinux.org/alpine/edge/main --allow-untrusted

              – Anton Babushkin
              Aug 22 '17 at 23:53







              Agreed, this is normally a dependency, but if you're installing nodejs manually (I was installing it from the 'edge' repo as well because as of now 6.7 is deprecated) then you need to install nodejs-npm separately Here's what I ran: apk add nodejs=6.11.2-r0 nodejs-npm=6.11.2-r0 --update-cache --repository dl-cdn.alpinelinux.org/alpine/edge/main --allow-untrusted

              – Anton Babushkin
              Aug 22 '17 at 23:53






              4




              4





              Side question: while this answer works just fine, I can't seem to find nodejs-npm on pkgs.alpinelinux.org/packages. There is npm package which also does the job. Is it some kind of alias?

              – Tad Lispy
              Jul 25 '18 at 14:28





              Side question: while this answer works just fine, I can't seem to find nodejs-npm on pkgs.alpinelinux.org/packages. There is npm package which also does the job. Is it some kind of alias?

              – Tad Lispy
              Jul 25 '18 at 14:28











              8














              apk update && apk add nodejs installed the npm binary for me.






              share|improve this answer
























              • not anymore....

                – Panthro
                Aug 12 '17 at 22:50






              • 1





                Upvoted. Still works

                – bholagabbar
                Sep 13 '17 at 16:45











              • Disputing if something works should include versions of things...

                – Eric Swanson
                Jan 3 at 22:00
















              8














              apk update && apk add nodejs installed the npm binary for me.






              share|improve this answer
























              • not anymore....

                – Panthro
                Aug 12 '17 at 22:50






              • 1





                Upvoted. Still works

                – bholagabbar
                Sep 13 '17 at 16:45











              • Disputing if something works should include versions of things...

                – Eric Swanson
                Jan 3 at 22:00














              8












              8








              8







              apk update && apk add nodejs installed the npm binary for me.






              share|improve this answer













              apk update && apk add nodejs installed the npm binary for me.







              share|improve this answer












              share|improve this answer



              share|improve this answer










              answered Jan 6 '17 at 11:39









              John DelaneyJohn Delaney

              8111




              8111













              • not anymore....

                – Panthro
                Aug 12 '17 at 22:50






              • 1





                Upvoted. Still works

                – bholagabbar
                Sep 13 '17 at 16:45











              • Disputing if something works should include versions of things...

                – Eric Swanson
                Jan 3 at 22:00



















              • not anymore....

                – Panthro
                Aug 12 '17 at 22:50






              • 1





                Upvoted. Still works

                – bholagabbar
                Sep 13 '17 at 16:45











              • Disputing if something works should include versions of things...

                – Eric Swanson
                Jan 3 at 22:00

















              not anymore....

              – Panthro
              Aug 12 '17 at 22:50





              not anymore....

              – Panthro
              Aug 12 '17 at 22:50




              1




              1





              Upvoted. Still works

              – bholagabbar
              Sep 13 '17 at 16:45





              Upvoted. Still works

              – bholagabbar
              Sep 13 '17 at 16:45













              Disputing if something works should include versions of things...

              – Eric Swanson
              Jan 3 at 22:00





              Disputing if something works should include versions of things...

              – Eric Swanson
              Jan 3 at 22:00











              4














              The issue here is a recent one and is due to changes in Alpine's package repositories between v3.5 and v3.6 or edge.



              In v3.5 nodejs included npm
              In v3.6 nodesjs does not include npm and the new nodejs-npm package exists.



              See here for Alpine packages.
              To see what version of packages you are pulling from look at the contents of /etc/apk/repositories






              share|improve this answer




























                4














                The issue here is a recent one and is due to changes in Alpine's package repositories between v3.5 and v3.6 or edge.



                In v3.5 nodejs included npm
                In v3.6 nodesjs does not include npm and the new nodejs-npm package exists.



                See here for Alpine packages.
                To see what version of packages you are pulling from look at the contents of /etc/apk/repositories






                share|improve this answer


























                  4












                  4








                  4







                  The issue here is a recent one and is due to changes in Alpine's package repositories between v3.5 and v3.6 or edge.



                  In v3.5 nodejs included npm
                  In v3.6 nodesjs does not include npm and the new nodejs-npm package exists.



                  See here for Alpine packages.
                  To see what version of packages you are pulling from look at the contents of /etc/apk/repositories






                  share|improve this answer













                  The issue here is a recent one and is due to changes in Alpine's package repositories between v3.5 and v3.6 or edge.



                  In v3.5 nodejs included npm
                  In v3.6 nodesjs does not include npm and the new nodejs-npm package exists.



                  See here for Alpine packages.
                  To see what version of packages you are pulling from look at the contents of /etc/apk/repositories







                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered Nov 1 '17 at 23:14









                  PeterPeter

                  411




                  411























                      1














                      For the recent versions of Alpine (v3.8+) the correct way to install nodejs with
                      npm is:



                      apk add --update nodejs npm



                      However, npm package depends on nodejs, so you can do:



                      apk add --update npm



                      Note: since Alpine 3.8 there is no nodejs-npm package.






                      share|improve this answer








                      New contributor




                      Ruslan Isay is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                      Check out our Code of Conduct.

























                        1














                        For the recent versions of Alpine (v3.8+) the correct way to install nodejs with
                        npm is:



                        apk add --update nodejs npm



                        However, npm package depends on nodejs, so you can do:



                        apk add --update npm



                        Note: since Alpine 3.8 there is no nodejs-npm package.






                        share|improve this answer








                        New contributor




                        Ruslan Isay is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                        Check out our Code of Conduct.























                          1












                          1








                          1







                          For the recent versions of Alpine (v3.8+) the correct way to install nodejs with
                          npm is:



                          apk add --update nodejs npm



                          However, npm package depends on nodejs, so you can do:



                          apk add --update npm



                          Note: since Alpine 3.8 there is no nodejs-npm package.






                          share|improve this answer








                          New contributor




                          Ruslan Isay is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                          Check out our Code of Conduct.










                          For the recent versions of Alpine (v3.8+) the correct way to install nodejs with
                          npm is:



                          apk add --update nodejs npm



                          However, npm package depends on nodejs, so you can do:



                          apk add --update npm



                          Note: since Alpine 3.8 there is no nodejs-npm package.







                          share|improve this answer








                          New contributor




                          Ruslan Isay is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                          Check out our Code of Conduct.









                          share|improve this answer



                          share|improve this answer






                          New contributor




                          Ruslan Isay is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                          Check out our Code of Conduct.









                          answered yesterday









                          Ruslan IsayRuslan Isay

                          111




                          111




                          New contributor




                          Ruslan Isay is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                          Check out our Code of Conduct.





                          New contributor





                          Ruslan Isay is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                          Check out our Code of Conduct.






                          Ruslan Isay is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                          Check out our Code of Conduct.























                              0














                              npm comes hand in hand with nodejs.
                              In the case you cant install node with apk add nodejs, you need fix that first.
                              Step 1 - do you have the community repo added to your /etc/apk/repositories list? If not, it is very useful to do so. Further details: https://wiki.alpinelinux.org/wiki/Enable_Community_Repository






                              share|improve this answer



















                              • 3





                                Can you explain the down vote?

                                – vizmi
                                Sep 20 '17 at 4:20
















                              0














                              npm comes hand in hand with nodejs.
                              In the case you cant install node with apk add nodejs, you need fix that first.
                              Step 1 - do you have the community repo added to your /etc/apk/repositories list? If not, it is very useful to do so. Further details: https://wiki.alpinelinux.org/wiki/Enable_Community_Repository






                              share|improve this answer



















                              • 3





                                Can you explain the down vote?

                                – vizmi
                                Sep 20 '17 at 4:20














                              0












                              0








                              0







                              npm comes hand in hand with nodejs.
                              In the case you cant install node with apk add nodejs, you need fix that first.
                              Step 1 - do you have the community repo added to your /etc/apk/repositories list? If not, it is very useful to do so. Further details: https://wiki.alpinelinux.org/wiki/Enable_Community_Repository






                              share|improve this answer













                              npm comes hand in hand with nodejs.
                              In the case you cant install node with apk add nodejs, you need fix that first.
                              Step 1 - do you have the community repo added to your /etc/apk/repositories list? If not, it is very useful to do so. Further details: https://wiki.alpinelinux.org/wiki/Enable_Community_Repository







                              share|improve this answer












                              share|improve this answer



                              share|improve this answer










                              answered Sep 20 '17 at 4:04









                              vizmivizmi

                              109




                              109








                              • 3





                                Can you explain the down vote?

                                – vizmi
                                Sep 20 '17 at 4:20














                              • 3





                                Can you explain the down vote?

                                – vizmi
                                Sep 20 '17 at 4:20








                              3




                              3





                              Can you explain the down vote?

                              – vizmi
                              Sep 20 '17 at 4:20





                              Can you explain the down vote?

                              – vizmi
                              Sep 20 '17 at 4:20


















                              draft saved

                              draft discarded




















































                              Thanks for contributing an answer to Super User!


                              • 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%2fsuperuser.com%2fquestions%2f1125969%2fhow-to-install-npm-in-alpine-linux%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

                              Couldn't open a raw socket. Error: Permission denied (13) (nmap)Is it possible to run networking commands...

                              VNC viewer RFB protocol error: bad desktop size 0x0I Cannot Type the Key 'd' (lowercase) in VNC Viewer...

                              Why not use the yoke to control yaw, as well as pitch and roll? Announcing the arrival of...