Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Client typescript errors #1317

Open
4 of 6 tasks
dan2kx opened this issue Apr 24, 2023 · 0 comments
Open
4 of 6 tasks

Client typescript errors #1317

dan2kx opened this issue Apr 24, 2023 · 0 comments
Labels
bug Something is not working.

Comments

@dan2kx
Copy link

dan2kx commented Apr 24, 2023

Preflight checklist

Describe the bug

I'm using @ory/keto-grpc-client with typescript and i am seeing compiler issues in some files...

node_modules/@ory/keto-grpc-client/ory/keto/relation_tuples/v1alpha2/write_service_grpc_pb.d.ts
node_modules/@ory/keto-grpc-client/ory/keto/relation_tuples/v1alpha2/check_service_grpc_pb.d.ts
node_modules/@ory/keto-grpc-client/ory/keto/relation_tuples/v1alpha2/expand_service_grpc_pb.d.ts
node_modules/@ory/keto-grpc-client/ory/keto/relation_tuples/v1alpha2/read_service_grpc_pb.d.ts

Cannot find module 'grpc' or its corresponding type declarations.

import * as grpc from "grpc";

I think maybe those should be importing from "@grpc/grpc-js" instead?

Additionally,

node_modules/@ory/keto-grpc-client/ory/keto/relation_tuples/v1alpha2/index.d.ts:11:3 - error TS2666: Exports and export assignments are not permitted in module augmentations.

node_modules/@ory/keto-grpc-client/index.d.ts:4:3 - error TS2666: Exports and export assignments are not permitted in module augmentations.

Here is my tsconfig file,

{
  "compilerOptions": {
    "esModuleInterop": true,
    "forceConsistentCasingInFileNames": true,
    "lib": ["esnext"],
    "module": "commonjs",
    "moduleResolution": "node",
    "outDir": "./dist",
    "rootDir": "./src"
    "sourceMap": true,
    "strict": true,
    "target": "es5"
  },

  "include": ["src/**/*"],
  "exclude": ["node_modules", "dist"]
}

Reproducing the bug

Create typescript project and use tsc command to build

Relevant log output

No response

Relevant configuration

No response

Version

0.11.0-alpha.0

On which operating system are you observing this issue?

None

In which environment are you deploying?

None

Additional Context

I can overcome the issue for now by adding skipLibCheck: true, but i would prefer to not have to do that long term

@dan2kx dan2kx added the bug Something is not working. label Apr 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something is not working.
Projects
None yet
Development

No branches or pull requests

1 participant