Skip to content
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

[Bug]: FetchPlugin fails when initiating #460

Closed
de87684333 opened this issue Oct 12, 2023 · 3 comments
Closed

[Bug]: FetchPlugin fails when initiating #460

de87684333 opened this issue Oct 12, 2023 · 3 comments

Comments

@de87684333
Copy link

Which web client version did you detect this bug with?

v1.15.0

What environment (build systems, module system, and framework) did you detect this bug with?

TypeScript v5.1.6, Webpack v4.46.0, ECMAScript modules (ESM), Angular 16.2.8

Is your web application a single page application (SPA) or multi page application (MPA)?

None

Please provide your web client configuration

{
allowCookies: true,
endpoint: "https://dataplane.rum.us-west-2.amazonaws.com",
guestRoleArn: "arn:aws:iam::000000000000:role/RUM-Monitor-us-west-2-000000000000-00xx-Unauth",
identityPoolId: "us-west-2:00000000-0000-0000-0000-000000000000",
sessionSampleRate: 1,
telemetries: ['errors', 'performance', 'http']
}

Please describe the bug/issue

Since Tuesday and the update of @types/nodes to v20.8.4 (https://www.npmjs.com/package/@types/node/v/20.8.4), my angular project was failing during 'ng test' or 'ng serve' command.

At first, the project was working with the version 1.15.0 of aws-rum-web but then failed with the following error in FetchPlugin

error TS2416: Property 'patches' in type 'FetchPlugin' is not assignable to the same property in base type 'MonkeyPatched<Window, "fetch">'
[...]
Property 'referrer' is missing in type 'import("/home/runner/work/periscop-front/periscop-front/node_modules/undici-types/fetch").Request' but required in type 'Request'.

I was able to make my project works again by downgrading explicitly the @types/node version.

@de87684333 de87684333 changed the title [Bug]: [Bug]: FetchPlugin fails when initiating Oct 12, 2023
@qiah
Copy link
Contributor

qiah commented Oct 13, 2023

Hi @de87684333, are you also using node 20 for your project. "type" issue usually happens when the @types/node and node version doesn't match.

@de87684333
Copy link
Author

Hi @qiah, I tried with node v20, I still get the issue. Nevertheless, Angular v16 is not compatible with node v20 it could be an issue.

But the fact is application is working with v20.8.3 of @types/node but not with the v20.8.4 or v20.8.5

@limhjgrace
Copy link
Contributor

Hello, according to the Angular documentation, it seems that that is expected as Angular v16 is not yet "officially" compatible with node v20. It seems that downgrading the node version is a valid workaround. Please reopen the ticket should there be any additional questions!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants