Updating Nodejs version never works!
-
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
-
@phenomlab ok how do i know what versions are installed, so i can uninstall?
I tried
nvm unistall 4.9.1
and nvm uninstall 8.16.2
But it says N/A version is not installedEven says 16.13.0 not installed (which I saw listed in that output)
You said they are still listed, but where?
nvm list only has 18.16.0 in green? -
@eeeee I think I might need to look at this directly if that works for you. You have a user account over at Sudonix.com, so could you contact me there to save clogging up this site?
-
Just as an update, incase anyone else with same issue looks up this thread...
I was totally unaware that nodejs and node are two different commands
I should have been doing node --version, as this is what nodeBB uses !
Thanks @phenomlab for sorting it all out -
@eeeee for what it's worth, it's internal policy in NodeBB that
nvm
andn
NEVER be installed on our client machines.It's caused far too much headache for this very same reason. I think I have gone as far as to migrate an entire client site to another server just to get back to a node version I could control. It was rather cathartic to send the old server to
/dev/null
.Anyway, the problem here is as @phenomlab pointed out, is path related. Both
n
andnvm
fmuck around with the symlinks in/usr/bin
or/bin
, etc., and there's no easy way to undo what those scripts do unless you run the uninstallation script.How do you know which uninstall script to run? You don't. Did you use
nvm
orn
, and if so, which one? Who knows now. If you do know, does the script provide information (via--help
flag or whatnot) to instruct you on how to uninstall it? Ha ha, of course not.Let me have
apt
control my dependencies any day. Warts and all. Rant over.