`engine` field in `package.json`

Describe the problem you would like to solve

I would like the metadata of the Node.JS package for OJS to tell me which versions of NodeJS are supported. This might help to avoid errors when running npm run build with OJS 3.3 on Debian Bookworm through Node 18.

Describe the solution you’d like

Use package.json | npm Docs

Who is asking for this feature?

Software Engineer

Additional information

# npm run build

> OJS3@3.3.0 build
> vue-cli-service build --no-clean


⠸  Building for production.../var/www/html/ojs/node_modules/loader-runner/lib/LoaderRunner.js:106
                        throw new Error("callback(): The callback was already called.");
                              ^

Error: callback(): The callback was already called.
    at context.callback (/var/www/html/ojs/node_modules/loader-runner/lib/LoaderRunner.js:106:10)
    at /var/www/html/ojs/node_modules/css-loader/dist/index.js:141:5

Node.js v18.19.0

Hi @jonr,

Dodging the ask slightly – but you can still build OJS 3.3.0-x with Node v18 using the following:

NODE_OPTIONS=--openssl-legacy-provider npm run build

Regards,
Alec Smecher
Public Knowledge Project Team

1 Like

Would we still want add an engine field to package.json to record and track supported Node versions?

This topic was automatically closed after 12 days. New replies are no longer allowed.

Discussion continues here:

https://github.com/pkp/pkp-lib/discussions/11209