#Stuck on node 16.18.1, unable to update

102 messages · Page 1 of 1 (latest)

hidden mural

Hi! I've been fighting with my VPS for the better half of a week trying to update my installation of nodejs to a higher version, I'm currently on 16.18.1. The issue I'm having is that when I try various commands to update it, it throws a permission error saying that it doesn't have access to update some of the files in the /usr/ location. So I decide to use sudo to try and do it, in which my server has a crisis and somehow the superusers don't have any idea node is installed.

I've tried reinstalling node completely to no avail, in the end had to restore a backup of the server because I'd managed to totally uproot it. I've tried any and all commands, tutorials on the internet, even turned to chatgpt also to no avail. If anyone has any idea how I can get unstuck, please let me know 😭

wide thunderBOT
  • Consider reading #how-to-get-help to improve your question!
  • Explain what exactly your issue is.
  • Post the full error stack trace, not just the top part!
  • Show your code!
  • Issue solved? Press the button!
honest lintel

Ok

Are you running Linux?

hidden mural

centos7, which is recently deprecated, but some of the modules I have don't work with centos8 yet 😢

honest lintel

That could be it but let’s try get around it

Run

It’s nvm node version nanager

Works like a dream most of the time for me

hidden mural

that was mentioned a few times, lemme try it again

alrighty, that's downloaded

honest lintel

I managed to get node on a really old pi 💀

what’s nvm -v

hidden mural

my vps appears to be a glorified block of cheese 💀

honest lintel

Try closing the terminal and opening a new one

hidden mural

oh yeah, it says that doesn't it, i'm fuckin stupid

0.39.7

honest lintel

Awesome

nvm install v20

hidden mural

please tell me it wasn't that easy

please

im begging

honest lintel

node -c

v*

😂😂

hidden mural

it was not 🥲

honest lintel

Wtf is that

hidden mural

I think thats one of the walls I hit previously

honest lintel

And what cmd did you run?

hidden mural

node -v and node --version

both show the same thing

honest lintel

Wot… that’s so… what

Do you pay for this vps

hidden mural

yeah

im telling you, my server is powered on hopes and dreams (+ £18 per month)

honest lintel

Wtf 💀

Idrk in all honesty, have you tried copying the error and pasting it to ur good old friend chatgpt to see what nonsense it spills out?

hidden mural

theoretically if we can figure out hte packages they come from and individually yum them or something, maybe that would work

chatgpt told me to "install ubuntu if all else fails"

honest lintel

Nonsense it is then

It’s confusing I’ve never seen that before but I’m not overly familiar with a lot@of that shit

Maybe jsut get a server with has unbuntu? Lmao

hidden mural

wait

no I think I know what that is

those packages are new to centos8

i hate everything

maybe I just upgrade to centos8 and see what still works after

vapid karma

18 euros is a lot for a server that doesn't work, honestly

honest lintel

Idk why ur paying that much, the company I use for like 4 gigs of ram 2 CPU’s is like 10$

If you’re not using a gui which you don’t really need for hosting then that’s plenty

hidden mural

😭

I don't really know how much I should be paying in all honesty

lemme find what I'm actually paying for

honest lintel

The better question is: What do you need hosting for

How big is the bot, are you running anything else? How power hungry is the bot etc etc

hidden mural

well, it's quite beefy, I've got multiple projects running at once

2 webservers
2 discord bots
2 redis instances
big database

honest lintel

Is there not an option on that host to just use Ubuntu?

hidden mural

there is but I'm a lot more experienced with centos and am a bit worried about transferring everything

honest lintel

Depending on the company, most of them will give you a helping hand. The one I use helps a lot when it comes to transferring

But sorry man, that’s basically the only thing I can think of atm

that’s what came to mind to myself too, that the c++ and gcc stuff is out of date or missing. Maybe they don’t come native to centos?

hidden mural

yeah, I'm about to take a fresh image of my server and upgrade to centos8, im just gonna fuckin risk it

I use ovh which is apparently "the best one in the uk", so if anything goes wrong, their support will get back to me in 8 years

honest lintel

Make sure to backup everything first

hidden mural

if centos still craps itself, ill find a new dist, like ubuntu maybe

or debian, but debian sounds like a japanese car brand

honest lintel
honest lintel
hidden mural

ovh is expensive but so far ive had no issues

apart from this

honest lintel

What do you have atm?

2 cpus 8gigs of ram?

hidden mural

4 cpus, 8 gigs afaik

no

maybe

honest lintel

I dmed you the support server, can probs open a ticket and ask them how much n stuff

hidden mural

either 4 vcores or 4 cpus ¯_(ツ)_/¯

alright thanks, ill check it out in a lil bit

my server is taking ages to back up

honest lintel

But that’s all I can suggest 🥲😭, other then just contacting ovh and being like “yo I’m stuck pls help”

hidden mural

"yo i suck at servers, fix it"

alright thanks, ill see how far I get 😄

honest lintel

No probs bro good luck

mortal ravine

Didnt read the whole thread but to avoid issues like this in the future, never install node through packet manager, install nvm, this will help you tremendously https://github.com/nvm-sh/nvm

honest lintel

You should’ve read because that’s what we used

mortal ravine

Oh yeah, you need to uninstall node beforehand otherwise it doesn't work correctly though

honest lintel

nvm is to install node

timber tendon
hidden mural it was not 🥲

Usually that happens when glibc gets something modified,

An approach to update Node, if anything, is to build from source

mortal ravine
lusty sentinel

and my linux host nowadays as well

grand kite

any benefits over nvm

lusty sentinel

mainly that unlike nvm it works for me on macos and seems to in general just be a more flawless experience when instally new versions and such

cant really say i extensively tested and compared both though

mortal ravine

I never had a single problem using nvm on macos, I first used it on macos 10.13 until now (runnin macos 14 currently)

You simply need to not have node install in any other way, uninstall it beforehand if so and you'll never run into issues

lusty sentinel

i cant install nvm itself is the issue

and i gave up trying to figure out why when i found fnm as it worked first try