So i can't install npm on 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 )

Best Answer


I have an issue with apk managers

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

apk add --update nodejs nodejs-npm