Skip to content

[v6] Notify user of why CLI fails on older Node versions #2544

@eebirke

Description

@eebirke

Problem Description

I spent some time trying to figure out why lingui extract wasn't working after upgrading to v6. Running it prints nothing, no errors or status messages.

Finally figured it out when attempting to create a minimal reproduction, which then used NPM instead of Yarn (v1) or Bun:

npm warn EBADENGINE Unsupported engine {
npm warn EBADENGINE   package: '@lingui/cli@6.0.1',
npm warn EBADENGINE   required: { node: '>=22.19.0' },
npm warn EBADENGINE   current: { node: 'v22.13.1', npm: '11.12.1' }
npm warn EBADENGINE }

After upgrading Node to the latest LTS version it started working again.

Proposed Solution

It might be a good idea to print whatever the error that causes early termination of the CLI instead of failing silently. Additionally it seems like required engine isn't universally warned about (yarn v1 and bun in my case).

Alternatives Considered

Adding info about the minimum required Node version could also just be added to the migration guide or the docs somewhere.

Additional Context

No response

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