Skip to content

httpHandlerInitialization - error - Cannot find name 'RequestInit #1402

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

Closed
VTLee opened this issue Sep 13, 2024 · 4 comments
Closed

httpHandlerInitialization - error - Cannot find name 'RequestInit #1402

VTLee opened this issue Sep 13, 2024 · 4 comments
Assignees
Labels
pending-release This issue will be fixed by an approved PR that hasn't been released yet.

Comments

@VTLee
Copy link

VTLee commented Sep 13, 2024

It appears that this commit yesterday added a function that references "RequestInit" as a type.

This type is not imported, and results in the following error:

../node_modules/@smithy/types/dist-types/http/httpHandlerInitialization.d.ts:114:50 - error TS2304: Cannot find name 'RequestInit'.

114     requestInit?: (httpRequest: IHttpRequest) => RequestInit;

I'm not familiar with Smithy / this code base, Just tracing down broken pipelines that appeared today. I can't see a reference to RequestInit in the node modules pulled in for this package.

@kuhe
Copy link
Contributor

kuhe commented Sep 13, 2024

Created a fix here: #1403. This is a global type that is not always present.

@VTLee
Copy link
Author

VTLee commented Sep 13, 2024

Created a fix here: #1403. This is a global type that is not always present.

Thank you for the prompt response!

@kuhe
Copy link
Contributor

kuhe commented Sep 13, 2024

We will release a patch version of @smithy/types momentarily. As an alternative you can stub the type with

declare global {
  interface RequestInit {}
}

which is what the patch will be doing.

@kuhe kuhe self-assigned this Sep 13, 2024
@kuhe kuhe added the pending-release This issue will be fixed by an approved PR that hasn't been released yet. label Sep 13, 2024
@kuhe
Copy link
Contributor

kuhe commented Sep 13, 2024

Should appear as https://www.npmjs.com/package/@smithy/types/v/3.4.2 in ~15 minutes.

@kuhe kuhe closed this as completed Sep 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pending-release This issue will be fixed by an approved PR that hasn't been released yet.
Projects
None yet
Development

No branches or pull requests

2 participants