Tuesday, May 7, 2024
3
rated 0 times [  3] [ 0]  / answers: 1 / hits: 13419  / 2 Years ago, wed, september 14, 2022, 4:03:04

The error is:



Error: npm doesn't work with node v0.5.11-pre
Required: node@>=0.6



But I'v just updated my node. That is confusing.



I'v made some digging and it seems that I've installed node two times



node version is v0.5.11-pre (node -v)



and



my nodejs version is v0.10.5 (nodejs -v)



When I check the usr/bin there is a link named 'node' and there is a application named 'nodejs'. The link points to /etc/alternatives/node link and this link points back to usr/bin/nodejs application.



I 'whereis' to the nodejs and node. These are output:



whereis node: 
/usr/bin/node /usr/bin/X11/node /usr/local/bin/node /usr/local/lib/node /usr/share/man/man1/node.1.gz

whereis nodejs:

/usr/bin/nodejs /usr/lib/nodejs /usr/bin/X11/nodejs /usr/include/nodejs /usr/share/nodejs /usr/share/man/man1/nodejs.1.gz


EDIT1:



I've also tried
apt-get remove node
and
apt-get remove nodejs



Intrestingly when I tried node command it still works.


More From » installation

 Answers
7

Changing update-alternatives like the following might help:



$ sudo update-alternatives --install /usr/bin/node nodejs /usr/bin/nodejs 100

$ node -v
v0.10.7


Maybe delete all alternatives to node before:



$ sudo update-alternatives --remove-all nodejs

[#31315] Thursday, September 15, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
oredoise

Total Points: 66
Total Questions: 116
Total Answers: 111

Location: Lebanon
Member since Sun, Aug 2, 2020
4 Years ago
;