Updating Nodejs version never works!
-
Not a NodeBB issue, but the NodeJS version on my server was v12 and I wanted to update it.
I have followed dozens of tutorial pages on how to update to --lts version, or even the latest version, without success
Although it appears to download, if I type nodejs --version it still comes back as v12.22.9
I have been trying to do this for two days, and seen many posts (and proposed solutions) on various forums. None of them have worked, but clearly I am not first to have this issue.Does this ring bells with anyone else?
That aside, do I have to stop nodeBB before I attempt a Nodejs version upgrade?
-
@eeeee seems like you may have more than one version of nodejs installed, and your environment variables point to this specific version.
Can you post the output of
whereis nodejs
andlocate nodejs
? Note that you many need to install themlocate
package for the second command. -
@phenomlab
The locate command gave 20pages of output, here is first few linesAnd last ones ...
I can see node-v16.13.0 mentioned in the middle pages of output, which would make more sense as current version, as v12 was long time ago.
But v12 is what --version says! -
Off topic but I tried to see whats in etc directory
Theres an environment file which seems to have duplicated words?!,
cat environment gives:
PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/sr/local/games:/snap/bin"And then in directory called environment.d, with two files
90atk-adaptor.conf 90gt-a11y.conf
Nothing with any paths related to NodeJs