xst icon indicating copy to clipboard operation
xst copied to clipboard

Required Node.js version

Open daliboris opened this issue 5 months ago • 3 comments

What happened?

I updated xst to the version 3.1.0.

The update proceeded with warnings - see CODE #1

Running xst after installation throws the error - see CODE #2

The README.md should mention minimal node.js version, or xst shoudn't be installed/updated if minimal required version is missing (I don't know if it's possible with npm).

Relevant shell output

CODE #1

npm update --global @existdb/xst
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE   package: '@existdb/[email protected]',
npm WARN EBADENGINE   required: { node: '^18.19.0 || >=20.5.0' },
npm WARN EBADENGINE   current: { node: 'v18.12.1', npm: '8.19.2' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE   package: '[email protected]',
npm WARN EBADENGINE   required: { node: '^18.19.0 || >=20.5.0' },
npm WARN EBADENGINE   current: { node: 'v18.12.1', npm: '8.19.2' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE   package: '[email protected]',
npm WARN EBADENGINE   required: { node: '>=18.18.0' },
npm WARN EBADENGINE   current: { node: 'v18.12.1', npm: '8.19.2' }
npm WARN EBADENGINE }

added 10 packages, removed 3 packages, changed 14 packages, and audited 286 packages in 11s

49 packages are looking for funding
  run `npm fund` for details

found 0 vulnerabilities

CODE #2

xst --version
file:///C:/Users/Boris/AppData/Roaming/npm/node_modules/@existdb/xst/node_modules/execa/lib/utils/max-listeners.js:1
import {addAbortListener} from 'node:events';
        ^^^^^^^^^^^^^^^^
SyntaxError: The requested module 'node:events' does not provide an export named 'addAbortListener'
    at ModuleJob._instantiate (node:internal/modules/esm/module_job:123:21)
    at async ModuleJob.run (node:internal/modules/esm/module_job:189:5)
    at async Promise.all (index 0)
    at async ESMLoader.import (node:internal/modules/esm/loader:530:24)
    at async loadESM (node:internal/process/esm_loader:91:5)
    at async handleMainPromise (node:internal/modules/run_main:65:12)

daliboris avatar Jul 29 '25 22:07 daliboris

I agree @daliboris the minimum required node version should be mentioned prominently in the readme. Would you take this on yourself?

line-o avatar Jul 30 '25 08:07 line-o

We should also investigate if we can give an actionable error if one attempts to run xst with a unsupported version of node at startup.

line-o avatar Jul 30 '25 08:07 line-o

Code #2 could look like

xst --version
Unsupported node version: please install <supported versions> to run xst

line-o avatar Jul 30 '25 08:07 line-o