Skip to content

Typescript type import wrong in fromTokenFile.d.ts #7457

@FranzZemen

Description

@FranzZemen

Checkboxes for prior research

Describe the bug

In the typescript type definition located at @aws-sdk/credential-provider-web-identity/dist-types/fromTokenFile.d.ts the import:

import { RuntimeConfigAwsCredentialIdentityProvider } from "@aws-sdk/types/src";

does not exist and causes a typescript compilation error. Instead it should be:

import { RuntimeConfigAwsCredentialIdentityProvider } from "@aws-sdk/types/dist-types/identity";

Regression Issue

  • Select this option if this issue appears to be a regression.

SDK version number

@aws-sdk/credential-providers@3.197.0

Which JavaScript Runtime is this issue in?

Node.js

Details of the browser/Node.js/ReactNative version

node v.26.4.0; typescript v.5.9.3

Reproduction Steps

Try compiling something that includes obtaining credentials from ini profile i.e:

Load credentials from ini profile i.e. try "defaults.credentials = fromIni({profile});"

No need to run, just compile it it will fail.

Observed Behavior

Error on compilation

node_modules/@aws-sdk/credential-provider-web-identity/dist-types/fromTokenFile.d.ts(2,60): error TS2307: Cannot find module '@aws-sdk/types/src' or its corresponding type declarations.

Expected Behavior

No errors expected

Possible Solution

In the typescript type definition located at @aws-sdk/credential-provider-web-identity/dist-types/fromTokenFile.d.ts the import:

import { RuntimeConfigAwsCredentialIdentityProvider } from "@aws-sdk/types/src";

does not exist and causes a typescript compilation error. Instead it should be:

import { RuntimeConfigAwsCredentialIdentityProvider } from "@aws-sdk/types/dist-types/identity";

Additional Information/Context

No response

Metadata

Metadata

Assignees

Labels

bugThis issue is a bug.p1This is a high priority issuepotential-regressionMarking this issue as a potential regression to be checked by team member

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions