caniuse-lite is outdated error during run.sh build

Hi all,

I’ve been trying for several days to install a local instance of galaxy on a VM running Ubuntu 22.04. I’ve created a local, non-root galaxy user and started a conda virtual environment running python 3.7.6 (although I’ve also tried this with many other versions of python as well). The installation seems to go well until it stalls with the following message:

$ GXY_BUILD_SOURCEMAPS=1 NODE_ENV=production webpack
Browserslist: caniuse-lite is outdated. Please run:
   npx update-browserslist-db@latest

I have run the suggested command several times, and I’m told that caniuse is up to date. I have also tried a host of npx and npm commands to make updates as well. Even so, I keep hitting this wall.

After the message, the build essentially stalls until it eventually throws an error 134, and some message about javascript heap out of memory.

Has anyone run into this issue and found a work around?

Thanks for any help!

(P.S. thanks to @jennaj and @cjkeist for help at a previous installation question, see here)

The caniuse warning message is a red herring, the issue is most likely the OOM crash. The Galaxy client build requires a substantial amount of memory sadly and if you have a tiny VM it might be crashing it. How much RAM does the VM have? Try cleaning the VM’s RAM, activating Galaxy’s venv and run make client-production in the Galaxy root folder independently of Galaxy’s startup. Alternatively give the VM more RAM for the build after each Galaxy update (that’s the only time the client needs building).

Hi @marten,

I gave the VM 10 GB of RAM, which I hoped would be enough. I’ll try increasing the RAM as well as your other suggestion above. Thanks so much for the help! I’ll let you know if this fixes it.

That should totally be enough, 4GB used to be enough and I hope it did not change much recently.

Hi @marten,

I just tried running: make client-production. I’m getting a new error:

error citation-js@0.6.8: The engine "node" is incompatible with this module. Expected version ">=14". Got "12.22.9"
error Found incompatible module
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command
make: *** [Makefile:177: client-node-deps] Error 1

I’m a bit lost, but I think the problem is with yarn (I get the same error running yarn in the console) and nodejs? Is it related to this post?

Thanks in advance for any help.

10GB should be more than enough, but I’ve created a PR here: [23.1] Makefile-based setting of NODE_OPTIONS for client build by dannon · Pull Request #16324 · galaxyproject/galaxy · GitHub that allows me to build successfully on a 1cpu4gb VM by setting max-old-space-size via the Makefile

Regarding your second issue, that node version is quite old, and, indeed, incompatible. Galaxy, depending on the version you are using, should be installing and trying to use v16 or v18. What galaxy version are you trying to use?

Hi @dannon,

I downloaded the most recent release, 23.0. (Or at least I think…) I used:

git clone -b release_23.0 https://github.com/galaxyproject/galaxy.git

to download the repository.

Update: Making the changes to the Makefile you suggested, the sh run.sh did not run into the “caniuse” error and the OOM crash. However, the build still failed with exit error 134 and directed me to look at documentation for the yarn package.

Ok, let’s break this apart a little bit.

Instead of run.sh, can you do the following, and list outputs? Outputs for the full run on my machine, here:

[dannon@inneoin:~/work/galaxy] source .venv/bin/activate                                                                                                                    release_23.0
(.venv) [dannon@inneoin:~/work/galaxy] which yarn                                                                                                                           release_23.0
/home/dannon/work/galaxy/.venv/bin/yarn
(.venv) [dannon@inneoin:~/work/galaxy] which node                                                                                                                           release_23.0
/home/dannon/work/galaxy/.venv/bin/node
(.venv) [dannon@inneoin:~/work/galaxy] node --version                                                                                                                       release_23.0
v18.12.1
(.venv) [dannon@inneoin:~/work/galaxy] cd client                                                                                                                            release_23.0
(.venv) [dannon@inneoin:~/work/galaxy/client] yarn install                                                                                                                  release_23.0
yarn install v1.22.19
[1/4] Resolving packages...
warning Resolution field "chokidar@3.5.3" is incompatible with requested version "chokidar@^2.0.0"
[2/4] Fetching packages...
[3/4] Linking dependencies...
warning " > vue-rx@6.2.0" has incorrect peer dependency "rxjs@^6.0.0".
warning " > autoprefixer@10.4.5" has unmet peer dependency "postcss@^8.1.0".
warning " > postcss-loader@7.0.1" has unmet peer dependency "postcss@^7.0.0 || ^8.0.1".
[4/4] Building fresh packages...
Done in 7.71s.
(.venv) [dannon@inneoin:~/work/galaxy/client] export NODE_OPTIONS=--max-old-space-size=3072 && yarn run build-production-maps                                          130 ↵release_23.0
yarn run v1.22.19
$ NODE_ENV=production gulp && yarn run webpack-production-maps && yarn run stage-build
[16:18:47] Using gulpfile ~/work/galaxy/client/gulpfile.js
[16:18:47] Starting 'default'...
[16:18:47] Starting 'fonts'...
[16:18:47] Starting 'stageLibs'...
[16:18:47] Starting 'buildPlugins'...
[16:18:47] Finished 'stageLibs' after 11 ms
[16:18:47] Finished 'buildPlugins' after 14 ms
[16:18:47] Starting 'cleanPlugins'...
[16:18:47] Finished 'fonts' after 21 ms
No changes detected for annotate_image
No changes detected for chiraviz
No changes detected for cytoscape
No changes detected for drawrna
No changes detected for editor
No changes detected for example
No changes detected for heatmap_default
No changes detected for hyphyvision
No changes detected for jqplot_bar
No changes detected for media_player
No changes detected for msa
No changes detected for mvpapp
No changes detected for ngl
No changes detected for nora
No changes detected for nvd3_bar
No changes detected for openlayers
No changes detected for openseadragon
No changes detected for PCA_3Dplot
No changes detected for phylocanvas
No changes detected for pv
No changes detected for ts_visjs
No changes detected for venn
No changes detected for new_user
[16:20:54] Finished 'cleanPlugins' after 179 ms
[16:20:54] Starting 'stagePlugins'...
[16:20:55] Finished 'stagePlugins' after 415 ms
[16:20:55] Finished 'default' after 610 ms
$ GXY_BUILD_SOURCEMAPS=1 NODE_ENV=production webpack
Browserslist: caniuse-lite is outdated. Please run:
  npx update-browserslist-db@latest
  Why you should do it regularly: https://github.com/browserslist/update-db#readme
Browserslist: caniuse-lite is outdated. Please run:
  npx update-browserslist-db@latest
  Why you should do it regularly: https://github.com/browserslist/update-db#readme
assets by status 2.92 MiB [cached] 84 assets
assets by status 16.6 MiB [compared for emit]
  assets by status 16.2 MiB [big]
    assets by chunk 4.41 MiB (id hint: vendors) 4 assets
    assets by status 6.1 MiB [emitted]
      asset analysis.bundled.js 3.4 MiB [emitted] [compared for emit] [minimized] [big] (name: analysis) 2 related assets
      + 2 assets
    asset base.css 3.33 MiB [compared for emit] [minimized] [big] (name: base) (id hint: styles) 1 related asset
    asset libs.bundled.js 2.41 MiB [compared for emit] [minimized] [big] (name: libs) (id hint: libs) 2 related assets
  + 8 assets
Entrypoint analysis [big] 9.14 MiB (25.6 MiB) = base.css 3.33 MiB libs.bundled.js 2.41 MiB analysis.bundled.js 3.4 MiB 3 auxiliary assets
Entrypoint generic [big] 7.94 MiB (21 MiB) = base.css 3.33 MiB libs.bundled.js 2.41 MiB generic.bundled.js 2.2 MiB 3 auxiliary assets
Entrypoint toolshed [big] 6.24 MiB (14.6 MiB) = base.css 3.33 MiB libs.bundled.js 2.41 MiB toolshed.bundled.js 510 KiB 3 auxiliary assets
orphan modules 15.1 MiB (javascript) 2.92 MiB (asset) 130 KiB (runtime) [orphan] 4966 modules
runtime modules 25.1 KiB 51 modules
built modules 23 MiB (javascript) 3.86 MiB (css/mini-extract) [built]
  modules by path ./node_modules/ 17.9 MiB (javascript) 76.5 KiB (css/mini-extract)
    javascript modules 17.7 MiB 2216 modules
    css modules 76.5 KiB 32 modules
    json modules 205 KiB 9 modules
  modules by path ./src/ 3.78 MiB (css/mini-extract) 5.06 MiB (javascript) 256 modules
  modules by path ../ 49.6 KiB
    ../static/plugins/welcome_page/new_user/dist/static/topics/index.js + 4 modules 24.6 KiB [built] [code generated]
    ../node_modules/prismjs/components/prism-bbj.js 978 bytes [optional] [built] [code generated]
    ../node_modules/prismjs/components/prism-bbj.min.js 873 bytes [optional] [built] [code generated]
    ../node_modules/prismjs/components/prism-bqn.js 1.51 KiB [optional] [built] [code generated]
    + 11 modules

WARNING in buffer
  Multiple versions of buffer found:
    5.7.1 ./~/sync-fetch/~/buffer
    6.0.3 ./~/buffer

WARNING in core-js
  Multiple versions of core-js found:
    2.6.12 ./~/babel-runtime/~/core-js
    3.24.1 ./~/core-js

WARNING in dompurify
  Multiple versions of dompurify found:
    2.3.10 ./~/jspdf/~/dompurify
    3.0.1 ./~/dompurify

WARNING in moment
  Multiple versions of moment found:
    2.20.1 ./~/moment
    2.29.4 ./~/pikaday/~/moment

WARNING in prismjs
  Multiple versions of prismjs found:
    1.28.0 ./~/prismjs
    1.29.0 /home/dannon/work/galaxy/~/prismjs

WARNING in tslib
  Multiple versions of tslib found:
    1.14.1 ./~/tslib
    2.4.0 ./~/rxjs/~/tslib

Check how you can resolve duplicate packages:
https://github.com/cerner/terra-toolkit/tree/main/packages/duplicate-package-checker-webpack-plugin#resolving-duplicate-packages-in-your-bundle

WARNING in asset size limit: The following asset(s) exceed the recommended size limit (244 KiB).
This can impact web performance.
Assets:
  2f517e09eb2ca6650ff5.svg (730 KiB)
  7a8b4f130182d19a2d7c.svg (897 KiB)
  analysis.bundled.js (3.4 MiB)
  generic.bundled.js (2.2 MiB)
  toolshed.bundled.js (510 KiB)
  CitationJS.bundled.js (1.56 MiB)
  base.css (3.33 MiB)
  libs.bundled.js (2.41 MiB)
  446.bundled.js (1.23 MiB)
  295.bundled.js (1.29 MiB)
  819.bundled.js (330 KiB)

WARNING in entrypoint size limit: The following entrypoint(s) combined asset size exceeds the recommended limit (244 KiB). This can impact web performance.
Entrypoints:
  analysis (9.14 MiB)
      base.css
      libs.bundled.js
      analysis.bundled.js
  generic (7.94 MiB)
      base.css
      libs.bundled.js
      generic.bundled.js
  toolshed (6.24 MiB)
      base.css
      libs.bundled.js
      toolshed.bundled.js


webpack 5.76.1 compiled with 8 warnings in 90447 ms
$ cpy 'dist/*' '../static/dist' && (git rev-parse HEAD 2>/dev/null || echo '') >../static/client_build_hash.txt
Done in 93.24s.

Hi @dannon,

Here is the output you requested. Thank you again for working with me on this:

(galaxy_env3.7.6) galaxy@lenovoserver:~/galaxy$ source .venv/bin/activate

(.venv) (galaxy_env3.7.6) galaxy@lenovoserver:~/galaxy$ source .venv/bin/activate release_23.0

(.venv) (galaxy_env3.7.6) galaxy@lenovoserver:~/galaxy$ which yarn release_23.0
/home/galaxy/galaxy/.venv/bin/yarn

(.venv) (galaxy_env3.7.6) galaxy@lenovoserver:~/galaxy$ which node release_23.0
/home/galaxy/galaxy/.venv/bin/node

(.venv) (galaxy_env3.7.6) galaxy@lenovoserver:~/galaxy$ node --version release_23.0
v18.12.1

(.venv) (galaxy_env3.7.6) galaxy@lenovoserver:~/galaxy$ cd client

(.venv) (galaxy_env3.7.6) galaxy@lenovoserver:~/galaxy/client$ yarn install release_23.0
yarn install v1.22.19
error `install` has been replaced with `add` to add new dependencies. Run "yarn add release_23.0" instead.
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.

(.venv) (galaxy_env3.7.6) galaxy@lenovoserver:~/galaxy/client$ yarn add release_23.0
yarn add v1.22.19
[1/4] Resolving packages...
warning Resolution field "chokidar@3.5.3" is incompatible with requested version "chokidar@^2.0.0"
error An unexpected error occurred: "https://registry.yarnpkg.com/release_23.0: Not found".
info If you think this is a bug, please open a bug report with the information provided in "/home/galaxy/galaxy/client/yarn-error.log".
info Visit https://yarnpkg.com/en/docs/cli/add for documentation about this command.
(.venv) (galaxy_env3.7.6) galaxy@lenovoserver:~/galaxy/client$ 

please run this as yarn install to avoid the error

Btw what is (galaxy_env3.7.6)? Is this some conda environment by any chance? Maybe try deactivating it if so.