Skip to content

--apikey argument not working with version 2.5.0 #7111

@brknkfr

Description

@brknkfr

Describe the bug
I specify a custom settings file under settings-custominstance.json for my custom etherpad-lite instance and specify it with the argument --settings. Until version 2.5.0 this worked for a custom APIKEY for the custom instance with --apikey APIKEY-custominstance.txt. The etherpad-lite version 2.5.0 won't start up with this argument any more. (The same for the --sessionkey argument.)

To Reproduce
Steps to reproduce the behavior:

  1. Start etherpad-lite with the --apikey argument and specify an APIKEY-custom_instance.txt file: pnpm run prod --settings settings-custom_instance.json --apikey APIKEY-custom_instance.txt
  2. Etherpad-lite throws an error:
> ep_etherpad-lite@2.5.0 prod src
> cross-env NODE_ENV=production node --require tsx/cjs node/server.ts --settings settings-custom_instance.json --apikey APIKEY-custom_instance.txt

src/node/utils/Cli.ts:51
    exports.argv.apikey = arg;
                 ^


TypeError: Cannot set properties of undefined (setting 'apikey')
    at <anonymous> (src/node/utils/Cli.ts:51:18)
    at Object.<anonymous> (src/node/utils/Cli.ts:55:1)
    at Module._compile (node:internal/modules/cjs/loader:1706:14)
    at Object.transformer (node_modules/.pnpm/tsx@4.20.5/node_modules/tsx/dist/register-D46fvsV_.cjs:3:1104)
    at Module.load (node:internal/modules/cjs/loader:1441:32)
    at Function._load (node:internal/modules/cjs/loader:1263:12)
    at TracingChannel.traceSync (node:diagnostics_channel:322:14)
    at wrapModuleLoad (node:internal/modules/cjs/loader:237:24)
    at Module.require (node:internal/modules/cjs/loader:1463:12)
    at require (node:internal/modules/helpers:147:16)

Node.js v22.19.0
src:
 ERR_PNPM_RECURSIVE_RUN_FIRST_FAIL  ep_etherpad-lite@2.5.0 prod: `cross-env NODE_ENV=production node --require tsx/cjs node/server.ts --settings settings-custom_instance.json --apikey APIKEY-custom_instance.txt`
Exit status 1
 ELIFECYCLE  Command failed with exit code 1.

Expected behavior
The argument --apikey (and --sessionkey) should still work.

Server (please complete the following information):

  • Etherpad version: 2.5.0
  • OS: Debian bookworm
  • Node.js version (node --version): v22.19.0
  • npm version (npm --version): 10.9.3
  • Is the server free of plugins: no

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions