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

Cannot find module 'aws-xray-sdk' #728

Closed
iDVB opened this issue Oct 4, 2021 · 2 comments
Closed

Cannot find module 'aws-xray-sdk' #728

iDVB opened this issue Oct 4, 2021 · 2 comments

Comments

@iDVB
Copy link

iDVB commented Oct 4, 2021

(Thanks for reporting an issue! Please make sure you click the link above to view the issue guidelines, then fill out the blanks below.)

What are the steps to reproduce this issue?

  1. import ssm from '@middy/ssm' in a TS project

What happens?

building causes the following error....

node_modules/@middy/ssm/index.d.ts:2:34 - error TS2307: Cannot find module 'aws-xray-sdk' or its corresponding type declarations.
2 import { captureAWSClient } from 'aws-xray-sdk'

What were you expecting to happen?

No errors. Definitely not relating to types for a dependency's dependency.

Other Thoughts

We are using aws-sdk v3 for our own needs aside from middy.... I don't see any peer or dep on the sdk in @middy/core or @middy/ssm surprisingly.... does this mean it just uses the default provided by AWS?

What versions of software are you using?

Node.js Version: v14.15.1
Middy Version: v2.5.1
AWS SDK Version: v3
"@aws-sdk/client-firehose": "^3.34.0",
"@aws-sdk/client-s3": "^3.34.0",

@willfarrell
Copy link
Member

middy does use aws-sdk v2 over v3 (See #584). @middy/ssm does include aws-xray-sdk in it's devDependencies, not sure why it's would throw an error. Happy to review a PR if you're able to resolve this for typescript developers.

@J4YF7O
Copy link

J4YF7O commented Nov 16, 2021

I realize that my PR #749 is closing this ticket... :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging a pull request may close this issue.

3 participants