Closed rajivshah3 closed 3 years ago
I manually made the change from awslabs/smithy-typescript#338 in @aws-sdk/types
, ran yarn pack
, and then yarn add file://path/to/tarball
and yarn tsc test.ts
seems to work now
Same issue i am also facing Nodejs Framework: nestjs TS : "typescript": "^3.9.7" AWS SDK: "@aws-sdk/client-s3": "^3.17.0"
Nest has another module for aws sdk but its in aws V2
tsconfig.json { "compilerOptions": { "module": "commonjs", "declaration": true, "removeComments": true, "emitDecoratorMetadata": true, "experimentalDecorators": true, "target": "es2017", "sourceMap": true, "outDir": "./dist", "baseUrl": "./", "incremental": true, "allowSyntheticDefaultImports": true, "resolveJsonModule": true }, "exclude": ["dist", "node_modules"] }
The issue was with internal release script. Updates about the fix: https://github.com/aws/aws-sdk-js-v3/issues/2474#issuecomment-871798569
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.
Describe the bug
Basically the same issue as #2217. This line is not supported in Typescript 3.x: https://github.com/aws/aws-sdk-js-v3/blob/4904f6abdb9791a5abfc164504e554a2c4f0ffa9/packages/types/src/util.ts#L109
Your environment
SDK version number
@aws-sdk/types@3.13.1
Is the issue in the browser/Node.js/ReactNative?
Node.js
Details of the browser/Node.js/ReactNative version
node: v12.19.1 tsc: v3.9.9
Steps to reproduce
package.json:
test.ts:
Observed behavior
Running
yarn && yarn tsc test.ts
gives the following output:Expected behavior
Should compile properly on Typescript 3.x
Additional context
The backwards-compatible types don't seem to exist at
dist/types/ts3.4/util.d.ts
ortypes/ts3.4/util.d.ts
in 3.13.1. They do appear atdist/types/ts3.4/util.d.ts
in 3.10.0, but I still get an error with that version. As mentioned in the linked issue, 3.6.1 works, but I haven't checked versions between 3.6.1 and 3.10.0. The backwards-compatible types exist for 3.6.1 exist attypes/ts3.4/util.d.ts
, so I wonder if that's the issue (in 3.10.0 they were indist
).