geneontology / amigo

AmiGO is the public interface for the Gene Ontology.
http://amigo.geneontology.org
BSD 3-Clause "New" or "Revised" License
29 stars 17 forks source link

Support node > 8 #710

Open nathanweeks opened 6 months ago

nathanweeks commented 6 months ago

Currently the Dockerfile & installation scripts appear to be compatible with node 8.x and npm 3.x (both long since EOL), currently installed on ubuntu:18.04 (also EOL) in the docker/Dockerfile, but not, e.g. nodejs 10.19.0 & npm 6.14.4 available for ubuntu 20.04:

$ docker run -it -v .:/app ubuntu:20.04
# apt update && DEBIAN_FRONTEND=noninteractive apt install -y npm
...
# cd /app && npm install 
...
# cp conf/examples/amigo.yaml.tomodachi conf/amigo.yaml
# ./node_modules/.bin/gulp install
...
npm ERR! code EINTEGRITY
npm ERR! sha1-pO5xiCFDkBUx/BcPbSKvBTVloMU= integrity checksum failed when using sha1: wanted sha1-pO5xiCFDkBUx/BcPbSKvBTVloMU= but got sha512-z4PhNX7vuL3xVChQ1m2AB9Yg5AULVxXcg/SpIdNs6c5H0NE8XYXysP+DGNKHfuwvY7kxvUdBeoGlODJ6+SfaPg== sha1-2jmj7l5rSw0yVb/vlWAYkK/YBwk=. (0 bytes)
...
npm ERR! Callback called more than once.

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2023-12-26T19_59_23_059Z-debug.log
[19:59:31] 'build' errored after 17 s 
[19:59:31] Error: Command `cd ./javascript/npm/amigo2-instance-data && npm install` exited with code: 1
    at formatError (/app/node_modules/gulp/node_modules/gulp-cli/lib/versioned/^4.0.0/format-error.js:21:10)
    at Gulp.<anonymous> (/app/node_modules/gulp/node_modules/gulp-cli/lib/versioned/^4.0.0/log/events.js:33:15)
    at Gulp.emit (events.js:203:15)
    at Gulp.EventEmitter.emit (domain.js:448:20)
    at Object.error (/app/node_modules/undertaker/lib/helpers/createExtensions.js:61:10)
    at handler (/app/node_modules/now-and-later/lib/mapSeries.js:47:14)
    at f (/app/node_modules/once/once.js:25:25)
    at f (/app/node_modules/once/once.js:25:25)
    at tryCatch (/app/node_modules/async-done/index.js:24:15)
    at done (/app/node_modules/async-done/index.js:40:12)
[19:59:31] 'install' errored after 17 s 

It would be helpful from a security and compatibility standpoint if the package*json files were updated to be compatible with more-recent nodejs versions (that are available to newer / still-supported Ubuntu releases).

kltm commented 6 months ago

@nathanweeks If you don't mind, I'm going to restructure this ticket a little: the current versions for package.json are:

  "engines": {
    "node": ">= 8.11.1",
    "npm": ">= 5.6.0"
  },

but the docker image and the instructions are lagging here. The images that we build up for local devops are processing over this. It would be nice to track more recent versions generally, but the priority has been lower. (Solr is a particulat pain point.) On the upside, as the actual servers are pretty much all perl and apache CGI, so there is little remote attack surface and that can be mitigated by proxies.