I'm on ubuntu 22.04
I'm using nodejs that I first installed with :
sudo apt install nodejs
But the version I had was 12 which is very old now. After that, I had trouble about the node version when installing modules with NPM (warnings about deprecated packages).
So I went back to nodejs web site, and choose to reinstall via snapcraft :
sudo snap install node --classic
Which seemed to worked :
node (18/stable) 18.16.0 from OpenJS Foundation (iojs✓) installed
But when I tried to use it, or even ask the version, I've got this error :
node server.js bash: /usr/bin/node: No such file or directory
node -v bash: /usr/bin/node: No such file or directory
So... I don't what to do, as snap tells me that node is correctly installed, but doesn't seems to.
I guess I maybe confussing somewhere, but don't where... Any idea?
Thank you.
Shall I reinstall it from binaries (which I hope not, cause I'm always scared to make mistakes this way)? Or am I doomed to node v12 for the rest of my life.... aaaaarrrrgggh ....