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

[BUG][v2.8.0] aws-v3 import is missing type definitions #771

Closed
maiconcarraro opened this issue May 10, 2024 · 3 comments · Fixed by #810
Closed

[BUG][v2.8.0] aws-v3 import is missing type definitions #771

maiconcarraro opened this issue May 10, 2024 · 3 comments · Fixed by #810
Labels
🐛 bug Something isn't working

Comments

@maiconcarraro
Copy link
Contributor

maiconcarraro commented May 10, 2024

Following https://github.com/opensearch-project/opensearch-js/blob/fb91e38130f1ccdddbe7e709f547b1fe5a58d591/USER_GUIDE.md#using-aws-v3-sdk

It shows:

const { AwsSigv4Signer } = require('@opensearch-project/opensearch/aws-v3'); // use aws-v3 import path if you are using aws-sdk v3

I'm currently using @opensearch-project/opensearch 2.8.0 which introduced these changes, but it doesn't work:

Type error: Could not find a declaration file for module '@opensearch-project/opensearch/aws-v3'. 'XXX/node_modules/@opensearch-project/opensearch/lib/aws/index-v3.js' implicitly has an 'any' type.
  If the '@opensearch-project/opensearch' package actually exposes this module, try adding a new declaration (.d.ts) file containing `declare module '@opensearch-project/opensearch/aws-v3';`

  3 | import { defaultProvider } from "@aws-sdk/credential-provider-node";
  4 | import { Client } from "@opensearch-project/opensearch";
> 5 | import { AwsSigv4Signer } from "@opensearch-project/opensearch/aws-v3";
    |                                ^
  6 |
  7 | const osClient = new Client({
  8 |   ...AwsSigv4Signer({
error Command failed with exit code 1.

It's missing the equivalent of https://github.com/opensearch-project/opensearch-js/blob/main/lib/aws/index.d.ts

@maiconcarraro maiconcarraro changed the title [BUG][v2.8.0] aws-v3 userguide example doesn't work [BUG][v2.8.0] aws-v3 import is missing type definitions May 10, 2024
@dblock
Copy link
Member

dblock commented May 13, 2024

Would love a fix @maiconcarraro, please?

@maiconcarraro
Copy link
Contributor Author

@dblock sorry for the delay, sent!

@dblock dblock added 🐛 bug Something isn't working and removed untriaged labels May 16, 2024
@dblock
Copy link
Member

dblock commented Jun 3, 2024

Closed via #776.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants