I am trying to install Node.js
Originally I tried to install it using apt-get install ....
However I later realised that these were out of date and uninstalled them using:
$ sudo apt-get --purge remove node
$ sudo apt-get --purge remove nodejs
I then followed the instructions here:
https://nodejs.org/en/download/package-manager/#debian-and-ubuntu-based-linux-distributions
which basically says to do the following:
curl -sL https://deb.nodesource.com/setup_6.x | sudo -E bash -
sudo apt-get install -y nodejs
I did this and it seemed to install fine! However the issue I have is the commands npm and node is not recognised! However the command nodejs is recognised.
I checked the directories /usr/local/bin and /usr/bin, but could not find node or npm. I did find nodejs though.
How do I fix this issue?
The following:
dpkg-query -s nodejs
outputs this:
Package: nodejs
Status: install ok installed
Priority: extra
Section: web
Installed-Size: 2339
Maintainer: Debian Javascript Maintainers <[email protected]>
Architecture: armhf
Version: 0.6.19~dfsg1-6
Depends: libc-ares2 (>= 1.7.3), libc6 (>= 2.13-28), libev4 (>= 1:4.04), libgcc1 (>= 1:4.4.0), libssl1.0.0 (>= 1.0.1), libstdc++6 (>= 4.3.0), libv8-3.8.9.20, zlib1g (>= 1:1.1.4)
Breaks: buddycloud-server (<< 0.3.1-2), carto (<< 0.4.6+ds1-2~), coffeescript (<< 1.3.3-3~), node-bones (<< 2.0.1+ds1-3~), node-cli (<< 0.4.4~20120516-1~), node-express (<< 2.5.9-2~), node-get (<< 1.1.5+ds1-2~), node-jake (<< 0.2.32-2~), node-less (<< 1.3.0~20120310-3~), node-mapnik (<< 0.6.7-3~), node-mbtiles (<< 0.2.3-2~), node-optimist (<< 0.3.1-2~), node-semver (<< 1.0.13-2~), node-tilelive (<< 4.2.1-4~), node-uglify (<< 1.2.6-2~), node-vows (<< 0.6.3-2~), npm (<< 1.1.4~dfsg-2~)
Description: Node.js event-based server-side javascript engine
Node.js is similar in design to and influenced by systems like
Ruby's Event Machine or Python's Twisted.
.
It takes the event model a bit further - it presents the event
loop as a language construct instead of as a library.
.
Node.js is bundled with several useful libraries to handle server tasks :
System, Events, Standard I/O, Modules, Timers, Child Processes, POSIX,
HTTP, Multipart Parsing, TCP, DNS, Assert, Path, URL, Query Strings.
Homepage: http://nodejs.org/