Cannot find module or its corresponding type declarations. #30769
Replies: 3 comments
-
Verify Installation: Make sure you have installed the necessary v3 client libraries in your project. Run the following command in your terminal: Bash If you're using yarn, use yarn add @aws-sdk/client-s3 @aws-sdk/s3-request-presigner. Check Codemod Output: Examine the migrated code files generated by aws-sdk-js-codemod. Look for any potential errors or incomplete changes. Manually add the missing import statements for the v3 client libraries: JavaScript Update Configuration (if applicable): If you're using a separate configuration file (e.g., aws-sdk.config.js), update it to use the v3 client constructors (S3.from instead of AWS.config.update). Before re-running the codemod script, create a backup of your code. If the previous steps don't resolve the issue, consider re-running aws-sdk-js-codemod only on the specific files that need migration. Make sure you're using the latest version of the codemod script to avoid potential bugs. Refer - https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/migrating.html |
Beta Was this translation helpful? Give feedback.
-
Hey @dushmanta05 |
Beta Was this translation helpful? Give feedback.
-
most likely its stupid |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello all,
I'm trying to migrate my
aws-sdk
V2 to V3 with the help of aws-sdk-js-codemod after I ran the command to migrate, it completed it, but the import modules are showing error: Cannot find module<module name>
or its corresponding type declarations.In V2, I was using the SDK import like below:
After migrating to V3,
But I'm getting error like this:
Could anyone help me with this? I appreciate your time. Thank you.
Beta Was this translation helpful? Give feedback.
All reactions