Skip to content

Request logging CLI option reported as unknown #744

@ssams

Description

@ssams

Description

the CLI utility lists a "--no-request-logging" option (shorthand "-L") in its "--help" output, which does not work. The CLI fails to start and reports the parameter as unknown if it's present on the command line:

npx serve@14.1.1 --no-request-logging dist/

error:

/root/.npm/_npx/abcb09c5f4b4e0d1/node_modules/arg/index.js:132
                                                throw new ArgError(
                                                      ^

ArgError: unknown or unexpected option: --no-request-logging
    at arg (/root/.npm/_npx/abcb09c5f4b4e0d1/node_modules/arg/index.js:132:13)
    at parseArguments (file:///root/.npm/_npx/abcb09c5f4b4e0d1/node_modules/serve/build/main.js:390:28)
    at file:///root/.npm/_npx/abcb09c5f4b4e0d1/node_modules/serve/build/main.js:467:40
    at ModuleJob.run (node:internal/modules/esm/module_job:193:25)
    at async Promise.all (index 0)
    at async ESMLoader.import (node:internal/modules/esm/loader:526:24)
    at async loadESM (node:internal/process/esm_loader:91:5)
    at async handleMainPromise (node:internal/modules/run_main:65:12) {
  code: 'ARG_UNKNOWN_OPTION'
}

looks like the option is only present in the static help text in

-L, --no-request-logging Do not log any request information to the console.
, but missing in the actual parsed options in
const options = {
?

Library version

14.1.1

Node version

v16.18.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions