If you try to install NPM on Alpine Linux through the
nodejs-npm package it will throw the following error:
ERROR: unable to select packages: nodejs-npm (no such package): required by: world[nodejs-npm]. The fix is very easy.
- Alpine Linux
- sudo privileges
Since the package name is changed to
npm we can fix it by executing the following command:
sudo apk add --update npm
The error should be fixed. To check the NPM version, run:
Feel free to leave a comment below and if you find this tutorial useful, follow our official channel on Telegram.