Closed ajohnston1219 closed 1 year ago
Okay, I believe I have found the issue. We are using @microsoft/rush for monorepo management, and somehow we ended up with side by side versions of @aws-sdk/types
, one of which was version 3.0.0 exactly. Removing this, I had to resolve several peer dependency issues regarding things like @aws-sdk/client-dynamodb requires peer dependency @aws-sdk/types@^3.0.0
. I am checking on our configuration now (I am new to rush), but my guess is that some setting in rush causes these dependencies to ignore the caret and install 3.0.0 exactly.
Regardless of the issue, if the minor versions of @aws-sdk/types
include breaking changes, should these peer dependencies be updated to be more specific? Like specify a minimum working minor version so that package manager version resolution settings won't break a build? Also, there were multiple versions of @aws-sdk/types
installed in our repo, and for whatever reason the import from @aws-sdk/types
was automatically resolving to 3.0.0 instead of the higher versions. I'm guessing this is a rush issue.
This specific issue has been fixed for me by installing @aws-sdk/types
explicitly in every service within the monorepo to make sure v3.0.0 doesn't exist anywhere. Therefore I will close the issue. But I think that a more specific version in the dependencies would be preferred if there are breaking changes in the minor versions. It seems like the version is defined with *
(this is the case in @aws-sdk/client-dynamodb
), which would imply that any version would work, but based on the issue I had as well as #3437 I believe this is incorrect now.
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs and link to relevant comments in this thread.
Checkboxes for prior research
Describe the bug
When trying to run
tsc
on a project with@aws-sdk/util-dynamodb
, the build fails due to missing types from@aws-sdk/types
. This is similar to #3437, but installing@aws/types
explicitly does not fix the issue.package.json
tsconfig.json
NOTE: This project was initialized using
cdk init lib --language=typescript
. Not much has been done other than trying to bring in the@aws-sdk/util-dynamodb
dependency for unmarshalling.SDK version number
@aws-sdk/util-dynamodb v3.316.0
Which JavaScript Runtime is this issue in?
Node.js
Details of the browser/Node.js/ReactNative version
tsc --version
=Version 4.9.5
Reproduction Steps
Create project with
cdk init lib --language=typescript
Install
@aws-sdk/util-dynamodb
Make sure
tsconfig.json
matches aboveImport
unmarshall
somewhere in the projectRun
tsc
in project directoryObserved Behavior
Expected Behavior
Successful transpilation
Possible Solution
This seems to be similar to #3437 except installing
@aws-sdk/types
explicitly does not fix itAdditional Information/Context
No response