-
Notifications
You must be signed in to change notification settings - Fork 578
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
3.54.1 generates error TS2305 "@aws-sdk/types" has no exported member 'SharedConfigFiles' / 'ParsedIniData' #3437
Comments
Possibly because of stripInternal tsconfig. |
The internal types are not stripped for types in $ pwd
/local/home/trivikr/workspace/aws-sdk-js-v3/packages/types
$ yarn clean && yarn build
...
$ cat dist-types/profile.d.ts
/**
* @internal
*/
export interface Profile {
[key: string]: string | undefined;
}
/**
* @internal
*/
export interface ParsedIniData {
[key: string]: Profile;
}
/**
* @internal
*/
export interface SharedConfigFiles {
credentialsFile: ParsedIniData;
configFile: ParsedIniData;
} |
I'm not sure why this issue is happening. It's possibly due to
I was not able to repro with the following project setup: tsconfig{
"compilerOptions": {
"target": "es2018",
"module": "commonjs",
"esModuleInterop": true,
"forceConsistentCasingInFileNames": true,
"strict": true,
"skipLibCheck": false
}
} index.tsimport { getSignedUrl } from "@aws-sdk/s3-request-presigner";
import {
S3Client,
GetObjectCommand,
S3ClientConfig,
GetObjectCommandInput,
} from "@aws-sdk/client-s3";
export const getSignedUrlForObject = (
clientParams: S3ClientConfig,
getObjectParams: GetObjectCommandInput
) => {
const client = new S3Client(clientParams);
const command = new GetObjectCommand(getObjectParams);
return getSignedUrl(client, command, { expiresIn: 3600 });
}; package.json{
"dependencies": {
"@aws-sdk/client-s3": "3.54.1",
"@aws-sdk/s3-request-presigner": "3.54.1"
},
"devDependencies": {
"@types/node": "17.0.21",
"typescript": "4.6.2"
}
} I've removed @internal tag from profile types in #3452 though. |
Was #3452 released in version 3.55.0, @trivikr? If so, it does not resolve the issue for me, as I get the same error running
{
"compileOnSave": false,
"compilerOptions": {
"allowSyntheticDefaultImports": true,
"declaration": false,
"downlevelIteration": true,
"emitDecoratorMetadata": true,
"esModuleInterop": true,
"experimentalDecorators": true,
"importHelpers": true,
"lib": [
"ES2018",
"dom"
],
"module": "es2020",
"moduleResolution": "node",
"noImplicitAny": true,
"outDir": "./dist/out-tsc",
"resolveJsonModule": true,
"sourceMap": true,
"strict": true,
"strictNullChecks": false,
"suppressImplicitAnyIndexErrors": true,
"target": "es2015"
}
} |
Running into this problem as well with 3.54.1 and 3.55.0 of the
And this caused by the s3-client, cause the other upgrades of the dependencies all work without issue, but as soon as I push |
I was able to get around this with |
Can confirm that |
Given the error messages I receive and the timing of their appearance with version 3.54.1, I suspect the issue originated in commit #ad6890d9eb58da4c2e192a461f78a57a5fc53f75, which added |
This is error persists in our project through the past 19 releases, including 3.72.0. I've tested a build moving When I look at the version of I believe the culprit in our project is |
I should probably just make Moreover, as I reported before, when I look at the errors generated by tsc
npx npm-why @aws-sdk/types
|
I faced a similar issue today after installing Fixed it by installing |
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
Running
tsc
on a project with the defaulttsconfig.json
skipLibCheck: false
produces multiple TS2305 errors.Your environment
SDK version number
Is the issue in the browser/Node.js/ReactNative?
TypeScript transpilation
Details of the browser/Node.js/ReactNative version
[email protected]
Steps to reproduce
Executing
tsc
on project dependent upon the@aws-sdk
libraries listed above.Observed behavior
Expected behavior
Project should transpile without error as before update.
The text was updated successfully, but these errors were encountered: