Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Nodejs appear installed but "–version" is not working. On Ubuntu 20.04 LTS

I am having trouble in installing nodejs, npm and a specific version of angularCli.
THe problem is that nodejs appears installed when I use the command

sudo apt install nodejs

but appears not installed when I check for the version.
By using the command which, I am not finding any of nodejs, npm or ng

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

Like I am showing in the screen.

>Solution :

the Node version at the default Apt PPA is broken. The package is no longer maintained and hasn’t been for a while now. It is stuck at version 10, whereas the current official stable release is 17.X.XX. The version is so old that it will not work (trying to use via command line will just give a version deprecation warning), and the NPM configuration installs in a way that anything installed with npm install xxxxx will not be useable.

My advice is to uninstall via apt remove and reinstall via curl or wget, or else add the NodeSource PPAs to sources.list and install from there. See here.

Be sure to uninstall the Ubuntu Repository package first. Otherwise, the system may give the Apt-installed binary priority.

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading