How to Install Node.js 10 LTS & NPM on FreeBSD 12

Welcome to our guide on how to install Node.js 10 LTS on FreeBSD 12. Node.js is a popular free and open source server-side programming language which runs on various platforms (Linux, Windows, Unix, MacOS). The Node 10 LTS codenamed “Dubnium“. will remain supported until April 2020.

From the output, you can see we have Node 10.11.0 available on FreeBSD repository. Install it using the command:

# pkg install node-10.11.0
Updating FreeBSD repository catalogue...
FreeBSD repository is up to date.
All repositories are up to date.
The following 3 package(s) will be affected (of 0 checked):
New packages to be INSTALLED:
node: 10.11.0
c-ares: 1.14.0_1
libuv: 1.23.1
Number of packages to be installed: 3
The process will require 32 MiB more space.
6 MiB to be downloaded.
Proceed with this action? [y/N]: y

When prompted for a y/n confirmation, press y. Below is the installation sample output