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.
Prerequisites
- Alpine Linux
- sudo privileges
Solution
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:
npm --version
Conclusion
Feel free to leave a comment below and if you find this tutorial useful, follow our official channel on Telegram.