galaxyproject / galaxy-hub

Galaxy Community Hub
https://galaxyproject.org/
Other
99 stars 282 forks source link

ERR_OSSL_EVP_UNSUPPORTED when building the site locally #1767

Closed sebastian-luna-valero closed 1 year ago

sebastian-luna-valero commented 1 year ago

Hi,

When trying to build the site locally, following https://galaxyproject.org/hub/contributing/, I got:

(galaxy-hub) sebastian@latitude-5420:~/devel/sebastian-luna-valero/galaxy-hub$ yarn develop
yarn run v1.22.19
$ src/build/run.mjs develop
$ src/build/preprocess.mjs preprocess --md copy --vue copy --insert copy --resource copy
Placing files into build directories.. 7.142 sec
Fixing Markdown files..                18.565 sec
Total preprocessing time:              25.711 sec
$ src/build/preprocess.mjs watch --md copy --vue copy --insert copy --resource copy &
$ gridsome develop
Gridsome v0.7.23

Initializing plugins...
/events/2018-06-27-de-stair-primer-rna-seq/: main_subsite 'deNBI' not recognized.
/events/2018-06-27-de-stair-primer-rna-seq/: Subsite 'deNBI' in subsites list not recognized.
/events/2018-09-04-gmds2018/: main_subsite 'deNBI' not recognized.
/events/2018-09-04-gmds2018/: Subsite 'deNBI' in subsites list not recognized.
/events/2019-03-06-galaxy-training-rostock/: main_subsite 'deNBI' not recognized.
/events/2019-03-06-galaxy-training-rostock/: Subsite 'deNBI' in subsites list not recognized.
/news/2021-02-czech-questionnaire/: Subsite 'elixir-cz' in subsites list not recognized.
/news/2021-03-06-eu-server-in-catris/: Subsite 'elixir-cz' in subsites list not recognized.
Load sources - 8.24s
Create GraphQL schema - 0.52s
Create pages and templates - 1.09s
Generate temporary code - 1.95s
Bootstrap finish - 12.65s
10% building 1/1 modules 0 activeError: error:0308010C:digital envelope routines::unsupported
    at new Hash (node:internal/crypto/hash:71:19)
    at Object.createHash (node:crypto:133:10)
    at module.exports (/home/sebastian/devel/sebastian-luna-valero/galaxy-hub/node_modules/webpack/lib/util/createHash.js:135:53)
    at NormalModule._initBuildHash (/home/sebastian/devel/sebastian-luna-valero/galaxy-hub/node_modules/webpack/lib/NormalModule.js:417:16)
    at handleParseError (/home/sebastian/devel/sebastian-luna-valero/galaxy-hub/node_modules/webpack/lib/NormalModule.js:471:10)
    at /home/sebastian/devel/sebastian-luna-valero/galaxy-hub/node_modules/webpack/lib/NormalModule.js:503:5
    at /home/sebastian/devel/sebastian-luna-valero/galaxy-hub/node_modules/webpack/lib/NormalModule.js:358:12
    at /home/sebastian/devel/sebastian-luna-valero/galaxy-hub/node_modules/loader-runner/lib/LoaderRunner.js:373:3
    at iterateNormalLoaders (/home/sebastian/devel/sebastian-luna-valero/galaxy-hub/node_modules/loader-runner/lib/LoaderRunner.js:214:10)
    at iterateNormalLoaders (/home/sebastian/devel/sebastian-luna-valero/galaxy-hub/node_modules/loader-runner/lib/LoaderRunner.js:221:10)
    at /home/sebastian/devel/sebastian-luna-valero/galaxy-hub/node_modules/loader-runner/lib/LoaderRunner.js:236:3
    at runSyncOrAsync (/home/sebastian/devel/sebastian-luna-valero/galaxy-hub/node_modules/loader-runner/lib/LoaderRunner.js:130:11)
    at iterateNormalLoaders (/home/sebastian/devel/sebastian-luna-valero/galaxy-hub/node_modules/loader-runner/lib/LoaderRunner.js:232:2)
    at Array.<anonymous> (/home/sebastian/devel/sebastian-luna-valero/galaxy-hub/node_modules/loader-runner/lib/LoaderRunner.js:205:4)
    at Storage.finished (/home/sebastian/devel/sebastian-luna-valero/galaxy-hub/node_modules/enhanced-resolve/lib/CachedInputFileSystem.js:55:16)
    at /home/sebastian/devel/sebastian-luna-valero/galaxy-hub/node_modules/enhanced-resolve/lib/CachedInputFileSystem.js:91:9
10% building 1/3 modules 2 active /home/sebastian/devel/sebastian-luna-valero/galaxy-hub/node_modules/webpack/hot/dev-server.jsnode:internal/crypto/hash:71
  this[kHandle] = new _Hash(algorithm, xofLen);
                  ^

Error: error:0308010C:digital envelope routines::unsupported
    at new Hash (node:internal/crypto/hash:71:19)
    at Object.createHash (node:crypto:133:10)
    at module.exports (/home/sebastian/devel/sebastian-luna-valero/galaxy-hub/node_modules/webpack/lib/util/createHash.js:135:53)
    at NormalModule._initBuildHash (/home/sebastian/devel/sebastian-luna-valero/galaxy-hub/node_modules/webpack/lib/NormalModule.js:417:16)
    at handleParseError (/home/sebastian/devel/sebastian-luna-valero/galaxy-hub/node_modules/webpack/lib/NormalModule.js:471:10)
    at /home/sebastian/devel/sebastian-luna-valero/galaxy-hub/node_modules/webpack/lib/NormalModule.js:503:5
    at /home/sebastian/devel/sebastian-luna-valero/galaxy-hub/node_modules/webpack/lib/NormalModule.js:358:12
    at /home/sebastian/devel/sebastian-luna-valero/galaxy-hub/node_modules/loader-runner/lib/LoaderRunner.js:373:3
    at iterateNormalLoaders (/home/sebastian/devel/sebastian-luna-valero/galaxy-hub/node_modules/loader-runner/lib/LoaderRunner.js:214:10)
    at Array.<anonymous> (/home/sebastian/devel/sebastian-luna-valero/galaxy-hub/node_modules/loader-runner/lib/LoaderRunner.js:205:4)
    at Storage.finished (/home/sebastian/devel/sebastian-luna-valero/galaxy-hub/node_modules/enhanced-resolve/lib/CachedInputFileSystem.js:55:16)
    at /home/sebastian/devel/sebastian-luna-valero/galaxy-hub/node_modules/enhanced-resolve/lib/CachedInputFileSystem.js:91:9
    at /home/sebastian/devel/sebastian-luna-valero/galaxy-hub/node_modules/enhanced-resolve/node_modules/graceful-fs/graceful-fs.js:123:16
    at FSReqCallback.readFileAfterClose [as oncomplete] (node:internal/fs/read_file_context:68:3) {
  opensslErrorStack: [ 'error:03000086:digital envelope routines::initialization error' ],
  library: 'digital envelope routines',
  reason: 'unsupported',
  code: 'ERR_OSSL_EVP_UNSUPPORTED'
}

Node.js v18.12.1

Then nothing starts at http://localhost:8080/

Should nodejs and yarn be pinned to specific versions?

Many thanks, Sebastian

wm75 commented 1 year ago

Running into the exact same error with npm instead of yarn. Downgraded nodejs to v16 (from 18), but that didn't help (though it removed all warnings during the install step).

bgruening commented 1 year ago

@sebastian-luna-valero sorry I missed that.

We created a Makefile to assist you with this. yarn/npm or so has problems with openssl. Try using our Makefile.

make install
conda activate galaxyproject-hub
yarn install
make run
wm75 commented 1 year ago

Yes, that is working for me :tada: Thanks!

wm75 commented 1 year ago

@dannon Do you think we should replace the info at https://galaxyproject.org/hub/contributing/#running-the-development-server with these working instructions?

dannon commented 1 year ago

@wm75 I wouldn't replace it, as the standard instructions (without requiring Make/conda) should work on most platforms, too. Maybe an additional section?

I ran into this on the Galaxy side with the jump to node 18 and we were able to update webpack dependencies to fix it. I need to see if I can do the same here, without breaking gridsome.

One fix, so we didn't have to change any acutal dependencies for plugins we may or may not control is shown here:

https://github.com/galaxyproject/galaxy/commit/5ab4a9dfff5903c558354dda2c184e6b391f5ce3#diff-c9427477b87245cccccca42c23adbd2f5e08baa09b50e6fec9b30ed42b5a7e2bR157

Simply setting that env var for modern node will also resolve this without requiring additional dependency installs I believe.

dannon commented 1 year ago

1777 Might fix this as well. The make+conda configuration is good to have, but I'd definitely like to make sure this works without.

wm75 commented 1 year ago

Thanks! Now I have two working ways of building things locally. If I find a bit of time I'll think about adding the conda option as an alternative way to the instructions.

dannon commented 1 year ago

@wm75 Thank you!

dannon commented 1 year ago

Should be resolved and compatible with both node 16 and 17+ with https://github.com/galaxyproject/galaxy-hub/pull/1777