valkey-glide: nodejs: Client uses types that are not available.

Describe the bug

The base client @valkey/valkey-glide uses types that are not available. Specifically it depends on types from glide-rs which it does not depend on. This causes module resolution to fail in some environments. In particular rushjs + pnpm.

Expected Behavior

Module resolution to work.

Current Behavior

It fails:

  [build:typescript] common/temp/node_modules/.pnpm/@valkey+valkey-glide@1.3.2/node_modules/@valkey/valkey-glide/build-ts/index.d.ts:4:43 - (TS2307) Cannot find module 'glide-rs' or its corresponding type declarations.
  [build:typescript] common/temp/node_modules/.pnpm/@valkey+valkey-glide@1.3.2/node_modules/@valkey/valkey-glide/build-ts/src/BaseClient.d.ts:4:24 - (TS2307) Cannot find module 'glide-rs' or its corresponding type declarations.
  [build:typescript] common/temp/node_modules/.pnpm/@valkey+valkey-glide@1.3.2/node_modules/@valkey/valkey-glide/build-ts/src/GlideClusterClient.d.ts:4:43 - (TS2307) Cannot find module 'glide-rs' or its corresponding type declarations.

Reproduction Steps

Simply building in the environment is enough.

Possible Solution

It seems like type defs are generated by the client compilation step and are present in the platform specifc clients. Maybe those can be used in the base client as well.’

Additional Information/Context

No response

Client version used

1.3.2

Engine type and version

8.0.2

OS

multiple

Language

TypeScript

Language Version

typtescript 5.5.4

Cluster information

No response

Logs

No response

Other information

No response

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 16 (10 by maintainers)

Most upvoted comments

For anyone else running into this problem, here is a patch that can be applied with patch-package: https://github.com/valkey-io/valkey-glide/issues/3195#issuecomment-2838602718