Skip to content

Client.js does not match the current version of redis npm module #22661

@ChoHadam

Description

@ChoHadam

Code of Conduct

What article on docs.github.com is affected?

https://docs.github.com/en/actions/using-containerized-services/creating-redis-service-containers

What part(s) of the article would you like to see updated?

Client.js, the example code for testing Redis service container, does not match the current version of redis npm module.

Currently, running npm install redis through terminal installs version 4.x(4.5.1) of redis by default. However, the Client.js code appears to have been written prior to redis v4.x. Comparing redis v4 and v3, the syntax and internal operation are completely different, as if creating a new package. For example, The redis v4 has been changed to operate asynchronously based on a promise object by default rather than based on a callback. More details can be found in the v3 to v4 Migration Guide.

Therefore, when the Client.js is executed on redis v4.x, the attached error occurs first, and other errors occur even if the legacy mode is applied like createClient({ legacyMode: true }).

Additional information

스크린샷 2022-12-13 오전 2 45 59

Metadata

Metadata

Assignees

No one assigned

    Labels

    contentThis issue or pull request belongs to the Docs Content team

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions