The (maven) build works correctly in r/20.x, but not in develop, failing with:
[INFO] You are using Node.js 20.12.2. Vite requires Node.js version 20.19+ or 22.12+. Please upgrade your Node.js version.
[INFO] file:///home/greg/opencast/upstream/modules/admin/node_modules/rolldown/dist/shared/binding-DI_PGVIh.mjs:507
[INFO] if (loadErrors.length > 0) throw new Error("Cannot find native binding. npm has a bug related to optional dependencies (https:
//github.com/npm/cli/issues/4828). Please try `npm i` again after removing both package-lock.json and node_modules directory.", { cause: loadE
rrors.reduce((err, cur) => {
[INFO] ^
[INFO]
[INFO] Error: Cannot find native binding. npm has a bug related to optional dependencies (https://github.com/npm/cli/issues/4828). Please try
`npm i` again after removing both package-lock.json and node_modules directory.
[INFO] at file:///home/greg/opencast/upstream/modules/admin/node_modules/rolldown/dist/shared/binding-DI_PGVIh.mjs:507:36
[INFO] at file:///home/greg/opencast/upstream/modules/admin/node_modules/rolldown/dist/shared/binding-DI_PGVIh.mjs:9:49
[INFO] ... 2 lines matching cause stack trace ...
[INFO] at async ModuleLoader.import (node:internal/modules/esm/loader:323:24)
[INFO] at async CAC.<anonymous> (file:///home/greg/opencast/upstream/modules/admin/node_modules/vite/dist/node/cli.js:764:28) {
[INFO] [cause]: Error: Cannot find module '@rolldown/binding-linux-x64-gnu'
[INFO] Require stack:
[INFO] - /home/greg/opencast/upstream/modules/admin/node_modules/rolldown/dist/shared/binding-DI_PGVIh.mjs
[INFO] at Module._resolveFilename (node:internal/modules/cjs/loader:1143:15)
[INFO] ... 2 lines matching cause stack trace ...
[INFO] at require (node:internal/modules/helpers:179:18)
[INFO] at requireNative (file:///home/greg/opencast/upstream/modules/admin/node_modules/rolldown/dist/shared/binding-DI_PGVIh.mjs:277:21
)
[INFO] at file:///home/greg/opencast/upstream/modules/admin/node_modules/rolldown/dist/shared/binding-DI_PGVIh.mjs:475:18
[INFO] at file:///home/greg/opencast/upstream/modules/admin/node_modules/rolldown/dist/shared/binding-DI_PGVIh.mjs:9:49
[INFO] at file:///home/greg/opencast/upstream/modules/admin/node_modules/rolldown/dist/shared/parse-Ceo3uqkd.mjs:3:46
[INFO] at ModuleJob.run (node:internal/modules/esm/module_job:222:25)
[INFO] at async ModuleLoader.import (node:internal/modules/esm/loader:323:24) {
[INFO] code: 'MODULE_NOT_FOUND',
[INFO] requireStack: [
[INFO] '/home/greg/opencast/upstream/modules/admin/node_modules/rolldown/dist/shared/binding-DI_PGVIh.mjs'
[INFO] ],
[INFO] cause: Error: Cannot find module '../rolldown-binding.linux-x64-gnu.node'
[INFO] Require stack:
[INFO] - /home/greg/opencast/upstream/modules/admin/node_modules/rolldown/dist/shared/binding-DI_PGVIh.mjs
[INFO] at Module._resolveFilename (node:internal/modules/cjs/loader:1143:15)
[INFO] at Module._load (node:internal/modules/cjs/loader:984:27)
[INFO] at Module.require (node:internal/modules/cjs/loader:1231:19)
[INFO] at require (node:internal/modules/helpers:179:18)
[INFO] at requireNative (file:///home/greg/opencast/upstream/modules/admin/node_modules/rolldown/dist/shared/binding-DI_PGVIh.mjs:272:
12)
[INFO] at file:///home/greg/opencast/upstream/modules/admin/node_modules/rolldown/dist/shared/binding-DI_PGVIh.mjs:475:18
[INFO] at file:///home/greg/opencast/upstream/modules/admin/node_modules/rolldown/dist/shared/binding-DI_PGVIh.mjs:9:49
[INFO] at file:///home/greg/opencast/upstream/modules/admin/node_modules/rolldown/dist/shared/parse-Ceo3uqkd.mjs:3:46
[INFO] at ModuleJob.run (node:internal/modules/esm/module_job:222:25)
[INFO] at async ModuleLoader.import (node:internal/modules/esm/loader:323:24) {
[INFO] code: 'MODULE_NOT_FOUND',
[INFO] requireStack: [
[INFO] '/home/greg/opencast/upstream/modules/admin/node_modules/rolldown/dist/shared/binding-DI_PGVIh.mjs'
[INFO] ]
[INFO] }
[INFO] }
[INFO] }
[INFO]
[INFO] Node.js v20.12.2
This raises a few issues, which I'm probably not qualified to answer:
1: What is the correct node version?
2: Should it/does it match the other submodules?
3: Can we somewhat easily detect this case and add a workflow to flag when this happens? I would like to avoid doing a full Opencast build, but I also want to avoid noticing this issue after the upstream PR has been filed/merged. I would love if I could grep for it and check that against the pom file.
The (maven) build works correctly in
r/20.x, but not indevelop, failing with:This raises a few issues, which I'm probably not qualified to answer:
1: What is the correct node version?
2: Should it/does it match the other submodules?
3: Can we somewhat easily detect this case and add a workflow to flag when this happens? I would like to avoid doing a full Opencast build, but I also want to avoid noticing this issue after the upstream PR has been filed/merged. I would love if I could
grepfor it and check that against the pom file.