Skip to content

Commander broken with nestjs v8 #1154

Open

Description

@uvera

Is there an existing issue that is already proposing this?

  • I have searched the existing issues

Potential Commit/PR that introduced the regression

3dcba7d

Versions

3.13.0 -> 3.14.0

Describe the regression

When upgrading to v3.14.0 which merged 3dcba7d, I get the following error

(node:465857) UnhandledPromiseRejectionWarning: TypeError: this.metadataScanner.getAllMethodNames is not a function
    at DiscoveryService.classMethodsWithMetaAtKey (/home/dusan/Projects/web-api/node_modules/@golevelup/nestjs-discovery/src/discovery.service.ts:171:33)

which is caused by fixing use of deprecated method scanFromPrototype golevelup/nestjs@92bf751

Minimum reproduction code

Expected behavior

Nest-commander should continue working with older nest versions.
Minor version upgrade is not expected to introduce breaking changes.

Other

No response

Activity

  1. micalevisk commented on Oct 12, 2024

    @micalevisk
    Contributor

    yeah, indeed

    From @golevelup/nestjs-discovery this is expected because of their peer deps:

    image

    while nest-commander@3 is supposed to support nestjs v8:

    image

    So I guess the only fix to this is doing some patching here (for nestjs v8 users only) because there is no version of @golevelup/nestjs-discovery that supports both nestjs v8 and v10 at same time, I just checked. Or maybe @jmcdo29 could just drop @golevelup/nestjs-discovery, idk

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions