I have installed nodejs
via apt-get install nodejs
. Works fine.
When I try to install socket.io
using npm install --save socket.io
I end up with failures:
npm WARN This failure might be due to the use of legacy binary "node"
I have attempted to fix this using:
sudo update-alternative --install /usr/bin/node node /usr/bin/nodesjs 10
... to no avail.
I tried to build node
from source, but npm
doesn't get installed - Docs say npm
should be installed when building node
from source.
I have downloaded the binaries from the node site and moved node
and npm
to /usr/local/bin
. Node works fine when doing this, but npm
doesn't. I always get command not found
and when trying to run npm
using the absolute path: /usr/local/bin/npm
it's not found (permissions were correct).
If I run: node -v
I get v0.10.29
which is the same as running 'nodejs -v'.
So, I am left in the dark not knowing what to do next.
Any advice please?