1
0
Fork 0
mirror of https://github.com/iiab/iiab.git synced 2025-02-12 19:22:24 +00:00
iiab/roles/nodejs
2022-10-22 22:29:09 -04:00
..
defaults internetarchive/tasks/install.yml: Enforce Node.js <= 18.x 2022-04-20 18:53:18 +00:00
tasks Use OS's Node.js & npm if Nodesource dragging (+ always wipe prior versions) 2022-10-22 21:50:37 -04:00
README.md Update nodejs/README.md 2022-10-22 22:29:09 -04:00

Please see IIAB's recommended Node.js version number around line 439 of /opt/iiab/iiab/vars/default_vars.yml

If nodesource.com doesn't yet support your OS

If nodesource.com does not yet support your Linux OS (they often support Debian pre-releases, but generally not other OS pre-releases) and IIAB's asked to install Node.js, it will do the equivalent of:

  • sudo apt install nodejs npm
  • sudo echo 'nodejs_installed: True' >> /etc/iiab/iiab_state.yml

AT YOUR OWN RISK, you can later run cd /opt/iiab/iiab then sudo ./runrole --reinstall nodejs if you really want to wipe your OS's own versions of Node.js and npm, and attempt the Nodesource approach instead.

See also late-breaking details about your individual OS:

Raspberry Pi Zero W Warning

Node.js applications like Asterisk/FreePBX, Node-RED and Sugarizer won't work on Raspberry Pi Zero W (ARMv6) if you installed Node.js while on RPi 3, 3 B+ (ARMv7) or RPi 4 (ARMv8).

If necessary, run sudo apt purge nodejs npm then sudo rm /etc/apt/sources.list.d/nodesource.list then sudo apt update and then attempt to install Node.js on the Raspberry Pi Zero W itself (cd /opt/iiab/iiab then sudo ./runrole --reinstall nodejs).

Earlier, some preferred installing the tar file version mentioned at #2082 — and if so, consider a more recent version like https://nodejs.org/dist/latest-v18.x/

You'll (likely) also then need to run: sudo apt install npm

Whatever versions of Node.js and npm you install, make sure /etc/iiab/iiab_state.yml contains the line nodejs_installed: True (add it if nec!) Finally, proceed to install Asterisk/FreePBX, Node-RED (Raspberry Pi notes) and/or Sugarizer: #1799