From febd64207daa33a425bbe5cbb65a4f14dfc1526f Mon Sep 17 00:00:00 2001 From: A Holt Date: Sat, 14 Jul 2018 13:28:39 -0400 Subject: [PATCH] Update main.yml --- roles/sugarizer/tasks/main.yml | 31 +++++++++++++++++-------------- 1 file changed, 17 insertions(+), 14 deletions(-) diff --git a/roles/sugarizer/tasks/main.yml b/roles/sugarizer/tasks/main.yml index bde050ada..b4cba0abf 100644 --- a/roles/sugarizer/tasks/main.yml +++ b/roles/sugarizer/tasks/main.yml @@ -52,10 +52,6 @@ # 3. INSTALL A GOOD VERSION OF Node.js AND npm -# Raspbian & Debian 9 STILL need this nodesource.com approach (July 2018) to get a recent version of npm. -# As documented at https://github.com/iiab/iiab/issues/798#issuecomment-404324530 -# This nodesource.com approach (brings in npm 5.6.0 with nodejs 8.11.3) -# would also work on Ubuntu 18.04, but U18's apt brings in npm 3.5.2, which is sufficient (SO FAR!?) - name: Set up Node.js 8.x apt sources (debuntu, but avoid ubuntu-18) shell: curl -sL https://deb.nodesource.com/setup_8.x | bash - when: internet_available and is_debuntu and not is_ubuntu_18 @@ -68,7 +64,23 @@ # state: present when: internet_available and is_debuntu and not is_ubuntu_18 -#- name: Install Node.js and npm (ubuntu-18) +# 2018-07-14: Raspbian (apt offers npm 1.4.21) & Debian 9 (apt offers no npm!) +# STILL NEED the above nodesource.com approach to get a version of npm that +# works with Sugarizer, as documented at: +# https://github.com/iiab/iiab/issues/798#issuecomment-404324530 + +# FYI this nodesource.com approach (brings in npm 5.6.0 with nodejs 8.11.3 +# for now) would also work on Ubuntu 18.04, and might even bring about a +# more sane consistency between mainline OS's? +# +# But For Now: Ubuntu 18.04's apt (approach below) brings in npm 3.5.2, +# which appears suffic "SO FAR"? 18.04's nodejs 8.10.0 is more reassuring! + +# Crazy Aside: some versions of npm can upgrade themselves to the latest +# (6.1.0 for now) using command "npm install -g npm", but careful as it +# ends up in /usr/local/bin causing future/pkg management issues: +# https://askubuntu.com/questions/1036278/npm-is-incorrect-version-on-latest-ubuntu-18-04-installation + - name: Install Node.js and npm (ubuntu-18 or not debuntu) package: name: "{{ item }}" @@ -78,15 +90,6 @@ - nodejs - npm -#- name: Install npm (OS's other than debuntu) -# package: -# name: "{{ item }}" -# state: present -# when: internet_available and not is_debuntu -# with_items: -# - nodejs -# - npm - # 4. RUN "npm install" TO POPULATE ~35MB /opt/iiab/sugarizer-server/node_modules # Re-running "npm install" USED TO fail on Raspbian 9 if not other OS's.