-
Notifications
You must be signed in to change notification settings - Fork 65.2k
Description
Code of Conduct
- I have read and agree to the GitHub Docs project's Code of Conduct
What article on docs.github.com is affected?
https://docs.github.com/en/actions/using-containerized-services/creating-redis-service-containers
docs/content/actions/using-containerized-services/creating-redis-service-containers.md
Line 279 in 803715b
| const redis = require("redis"); |
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 }).
