Score:1

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

in flag

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

Like I am showing in the screen.

guiverc avatar
cn flag
Providing your OS, release details, and source for the package may also help (*the package in your provided picture; which should be pasted as text in your question doesn't match any supported release so clues on where it came from maybe required*)
CasualUsers avatar
in flag
I already tried, with command which nothing appear
Score:2
it flag

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.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.