Node.js

Install

Node package manger puts various things on your computer. On OpenBSD it stores everything under /usr/local and that directory is owned by root. If you install modules globally (for example, prettier or eslint) I suggest you set npm prefix to ~/.node and add update PATH accordingly.

# pkg_add node
quirks-3.16 signed on 2018-10-12T15:26:25Z
node-8.12.0:flock-20110525p1: ok
node-8.12.0:gmake-4.2.1: ok
node-8.12.0: ok
...
#
$ npm set prefix "$HOME/.node"
$ npm install --global prettier
$ echo '
export PATH="$HOME/.node/bin:$PATH"
' >> "$HOME/.profile"
$
© roman zolotarev