Installing Note.js from binaries (the hacky way)

This post was written by eli on November 28, 2021
Posted Under: JavaScript,Rich text editors

Node.js is required to build several JavaScript packages (Quill, for example) and the version that was available from the repository of my Linux Mint 18.1 was way too old: node v4.2.6 and npm  v3.5.2. The attempt to build the Quill Webpack with those oldies failed miserably.

Truth to be said, there are instructions on how to install Node.js from binaries, but they relate to stash the installation away from the regular binary search part. So I improvised a bit, and hey, it works.

Download the latest binary (i.e. the Linux Binaries (x64) option) from Node.js’ main download page , extract and install. Everything (except the tar command) must be done as root:

$ tar -xvJf node-v16.13.0-linux-x64.tar.xz
# chown -R root:root node-v16.13.0-linux-x64/
# cd node-v16.13.0-linux-x64/
# mv include/node /usr/include/
# mv bin/* /usr/bin/
# mv lib/node_modules/ /usr/lib/
# mv share/man/man1/node.1 /usr/share/man/man1/
# mv share/systemtap/tapset/node.stp /usr/share/systemtap/tapset/

Note that some of the files in bin/ are relative symbolic links to lib/node_modules, so if the target directory outline is different from this, the symbolic links need to be remade.

After this, there should be no significant files to copy, so

$ find . -type f

Add a Comment

required, use real name
required, will not be published
optional, your blog address