npm install fails on newer version (12+) of node

Bug #1973639 reported by Gold
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mahara
21.10
Fix Released
Medium
Unassigned
22.04
Fix Released
Medium
Unassigned
22.10
Fix Released
High
Doris Tam

Bug Description

Setting up Mahara on a brand new, clean machine running Ubuntu 20.04 I found I had to install all the things.

Once I got npm working the 'npm install' step failed when using the current supported stable version of npm. I eventually rolled back to 8.11.3 from 16.15.0 and it just worked.

We should take a look at the package.json file and upgrade it to work with the current stable version of npm. There are also a lot of deprecated packages in use. It is likely that these would be resolved by moving to the latest versions of the packages we're using.

+++
gold@shipnet:~/Mahara/mahara$ npm install
npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated chokidar@2.1.8: Chokidar 2 does not receive security updates since 2019. Upgrade to chokidar 3 with 15x fewer dependencies
npm WARN deprecated tar@2.2.2: This version of tar is no longer supported, and will not receive security updates. Please upgrade asap.
npm WARN deprecated har-validator@5.1.5: this library is no longer supported
npm WARN deprecated uuid@3.4.0: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.
npm WARN deprecated fsevents@1.2.13: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.
npm WARN deprecated source-map-resolve@0.5.3: See https://github.com/lydell/source-map-resolve#deprecated
npm WARN deprecated resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated
npm WARN deprecated urix@0.1.0: Please see https://github.com/lydell/urix#deprecated
npm WARN deprecated source-map-url@0.4.1: See https://github.com/lydell/source-map-url#deprecated

> node-sass@4.14.1 install /home/gold/Mahara/mahara/node_modules/node-sass
> node scripts/install.js

Cached binary found at /home/gold/.npm/node-sass/4.14.1/linux-x64-57_binding.node

> es5-ext@0.10.61 postinstall /home/gold/Mahara/mahara/node_modules/es5-ext
> node -e "try{require('./_postinstall')}catch(e){}" || exit 0

> node-sass@4.14.1 postinstall /home/gold/Mahara/mahara/node_modules/node-sass
> node scripts/build.js

Binary found at /home/gold/Mahara/mahara/node_modules/node-sass/vendor/linux-x64-57/binding.node
Testing binary
Binary is fine
npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.2.7 (node_modules/chokidar/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.13: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})

added 513 packages in 20.937s

Doris Tam (doristam)
summary: - npm install fails
+ npm install fails on newer version of node
Doris Tam (doristam)
Changed in mahara:
assignee: nobody → Doris Tam (doristam)
milestone: none → 22.10.0
status: New → Incomplete
status: Incomplete → In Progress
Changed in mahara:
status: In Progress → Confirmed
Changed in mahara:
status: Confirmed → In Progress
importance: Undecided → High
Revision history for this message
Mahara Bot (dev-mahara) wrote : A patch has been submitted for review
Doris Tam (doristam)
summary: - npm install fails on newer version of node
+ npm install fails on newer version (12+) of node
Revision history for this message
Mahara Bot (dev-mahara) wrote : A change has been merged

Reviewed: https://reviews.mahara.org/c/mahara/+/13045
Committed: https://git.mahara.org/mahara/mahara/commit/50751f84849d2a5bfc8bd8f9323c39ebe61cd081
Submitter: "Robert Lyon <email address hidden>"
Branch: main

commit 50751f84849d2a5bfc8bd8f9323c39ebe61cd081
Author: Doris Tam <email address hidden>
Date: Tue Aug 9 17:53:18 2022 +1200

Bug 1973639: Update npm libs for node v12+ support

.nvmrc with nvm installed gets the LTS latest node version. Currently is 16
Note: a different version will need to be targeted for older versions of Mahara.

This is part of the process of getting LTS node working with Mahara

gulp-autoprefixer requires npm 8 min and browserlist location to be updated

Remaining issues are:

The appears to be 7 high priority issues, but we're already at the
highest version of gulp and it's telling us to go down.

The following issues are expected for now as they are managed dependencies of gulp and sass:

npm WARN deprecated source-map-url@0.4.1: See https://github.com/lydell/source-map-url#deprecated
npm WARN deprecated urix@0.1.0: Please see https://github.com/lydell/urix#deprecated
npm WARN deprecated resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated
npm WARN deprecated source-map-resolve@0.5.3: See https://github.com/lydell/source-map-resolve#deprecated
npm WARN deprecated chokidar@2.1.8: Chokidar 2 does not receive updates ... Upgrade to chokidar 3 with 15x fewer dependencies

Change-Id: Ic173b77ef79c4f09d7754a29c16e047d19945c5e

Revision history for this message
Robert Lyon (robertl-9) wrote :

For the backports we'd need to update bootstrap to version 5 also as there is code in htdocs/theme/raw/sass/lib/bootstrap4/ itself that is incompatible with npm 14

Revision history for this message
Mahara Bot (dev-mahara) wrote : A patch has been submitted for review

Patch for "22.04_DEV" branch: https://reviews.mahara.org/c/mahara/+/13233

Revision history for this message
Mahara Bot (dev-mahara) wrote :

Patch for "21.10_DEV" branch: https://reviews.mahara.org/c/mahara/+/13240

Revision history for this message
Robert Lyon (robertl-9) wrote :

Actually instead of backporting the whole patch as that relates to bootstrap 5 - I'll just backport the nvmrc file to use version 14

Revision history for this message
Mahara Bot (dev-mahara) wrote : A change has been merged

Reviewed: https://reviews.mahara.org/c/mahara/+/13240
Committed: https://git.mahara.org/mahara/mahara/commit/5a3cab6c3de72884c82c8adf33f2d13f8c8c56fd
Submitter: "Robert Lyon <email address hidden>"
Branch: 21.10_DEV

commit 5a3cab6c3de72884c82c8adf33f2d13f8c8c56fd
Author: Robert Lyon <email address hidden>
Date: Mon Oct 17 09:43:25 2022 +1300

Bug 1973639: bumping the nvm number for older branches

So that we are using the same version for all stable branches

Change-Id: I0ed1b887e227f8465b7f8d54bfecf05557bed46d
Signed-off-by: Robert Lyon <email address hidden>

Revision history for this message
Mahara Bot (dev-mahara) wrote :

Reviewed: https://reviews.mahara.org/c/mahara/+/13233
Committed: https://git.mahara.org/mahara/mahara/commit/1ed09d2379bc584405e7bf5b4646bfed2dfb16f9
Submitter: "Robert Lyon <email address hidden>"
Branch: 22.04_DEV

commit 1ed09d2379bc584405e7bf5b4646bfed2dfb16f9
Author: Robert Lyon <email address hidden>
Date: Mon Oct 17 09:43:25 2022 +1300

Bug 1973639: bumping the nvm number for older branches

So that we are using the same version for all stable branches

Change-Id: I0ed1b887e227f8465b7f8d54bfecf05557bed46d
Signed-off-by: Robert Lyon <email address hidden>

Revision history for this message
Mahara Bot (dev-mahara) wrote : A patch has been submitted for review
Revision history for this message
Mahara Bot (dev-mahara) wrote : A change has been merged

Reviewed: https://reviews.mahara.org/c/mahara/+/13239
Committed: https://git.mahara.org/mahara/mahara/commit/4760ba4587c4288f4d3176ff6667a8d0a1289475
Submitter: "Robert Lyon <email address hidden>"
Branch: main

commit 4760ba4587c4288f4d3176ff6667a8d0a1289475
Author: Fergus Whyte <email address hidden>
Date: Tue Oct 18 15:51:59 2022 +1300

Bug 1973639: NVM install Changes to for CI process

This also fixes an issue with new NVM installs not working untill you run "NVM install"

Change-Id: I1587129c804cb45530cf84793a79e23ff50c47af

Revision history for this message
Mahara Bot (dev-mahara) wrote : A patch has been submitted for review

Patch for "22.10_DEV" branch: https://reviews.mahara.org/c/mahara/+/13285

Revision history for this message
Mahara Bot (dev-mahara) wrote : A change has been merged

Reviewed: https://reviews.mahara.org/c/mahara/+/13285
Committed: https://git.mahara.org/mahara/mahara/commit/a32681d979483253b7d178e2c5e74a62108cc213
Submitter: "Robert Lyon <email address hidden>"
Branch: 22.10_DEV

commit a32681d979483253b7d178e2c5e74a62108cc213
Author: Fergus Whyte <email address hidden>
Date: Tue Oct 18 15:51:59 2022 +1300

Bug 1973639: NVM install Changes to for CI process

This also fixes an issue with new NVM installs not working untill you run "NVM install"

Change-Id: I1587129c804cb45530cf84793a79e23ff50c47af
(cherry picked from commit 4760ba4587c4288f4d3176ff6667a8d0a1289475)

Revision history for this message
Mahara Bot (dev-mahara) wrote : A patch has been submitted for review

Patch for "22.04_DEV" branch: https://reviews.mahara.org/c/mahara/+/13305

Revision history for this message
Mahara Bot (dev-mahara) wrote :

Patch for "21.10_DEV" branch: https://reviews.mahara.org/c/mahara/+/13286

Revision history for this message
Mahara Bot (dev-mahara) wrote : A change has been merged

Reviewed: https://reviews.mahara.org/c/mahara/+/13305
Committed: https://git.mahara.org/mahara/mahara/commit/474e0c86bea3b61f147f3a16d432593586e3df6b
Submitter: "Robert Lyon <email address hidden>"
Branch: 22.04_DEV

commit 474e0c86bea3b61f147f3a16d432593586e3df6b
Author: Fergus Whyte <email address hidden>
Date: Tue Oct 18 15:51:59 2022 +1300

Bug 1973639: NVM install Changes to for CI process

This also fixes an issue with new NVM installs not working untill you run "NVM install"

Change-Id: I1587129c804cb45530cf84793a79e23ff50c47af

Revision history for this message
Mahara Bot (dev-mahara) wrote :

Reviewed: https://reviews.mahara.org/c/mahara/+/13286
Committed: https://git.mahara.org/mahara/mahara/commit/d76acfa68d0820ce13bb56f84d328d1e9db5ac5c
Submitter: "Robert Lyon <email address hidden>"
Branch: 21.10_DEV

commit d76acfa68d0820ce13bb56f84d328d1e9db5ac5c
Author: Fergus Whyte <email address hidden>
Date: Tue Oct 18 15:51:59 2022 +1300

Bug 1973639: NVM install Changes to for CI process

This also fixes an issue with new NVM installs not working untill you run "NVM install"

Change-Id: I1587129c804cb45530cf84793a79e23ff50c47af

no longer affects: mahara
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.