question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[BUG] Type 'ReactPlugin' is not assignable to type 'ITelemetryPlugin'

See original GitHub issue

A type error similar to issue https://github.com/microsoft/ApplicationInsights-JS/issues/1324 has appeared in the latest versions: Type 'ReactPlugin' is not assignable to type 'ITelemetryPlugin'.

Versions:

Here’s the simplified example from my next.js app:

import { ReactPlugin } from '@microsoft/applicationinsights-react-js';
import {
  ApplicationInsights,
  ITelemetryPlugin,
} from '@microsoft/applicationinsights-web';

const appInsights = new ApplicationInsights({
  config: {
    connectionString: `InstrumentationKey=${process.env.AZURE_INSTURMENTATION_KEY};IngestionEndpoint=https://switzerlandnorth-0.in.applicationinsights.azure.com/;LiveEndpoint=https://switzerlandnorth.livediagnostics.monitor.azure.com/`,
    enableAutoRouteTracking: true,
    extensions: [new ReactPlugin()], // <- error happens here
  },
});

Issue Analytics

  • State:open
  • Created 9 months ago
  • Reactions:2
  • Comments:12 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
KuShcommented, Dec 14, 2022

Which versions of typescript are you all using?

Tested with 4.6.2 and 4.9.4. I can’t share my package.json and lock as is. I’ll try to find a minimal reproduction case.

1reaction
slavangacommented, Dec 14, 2022

@MSNev Changing the settings skipLibCheck and isolatedModules has no effect. I’m using the latest typescript version (v4.9.4).

Read more comments on GitHub >

github_iconTop Results From Across the Web

[BUG] Type 'ReactNativePlugin' is not assignable to ... - GitHub
This issue is a method signature issue only, as a workaround you should be able and can safely cast the plugin to an...
Read more >
@microsoft/applicationinsights-web | Yarn - Package Manager
1324[BUG] Type 'ReactNativePlugin' is not assignable to type 'ITelemetryPlugin'. Refactored the Plugin to extend BaseTelemetryPlugin (part of the #1076 work) ...
Read more >
microsoft/ApplicationInsights-JS 2.5.7 on GitHub
#1324 [BUG] Type 'ReactNativePlugin' is not assignable to type 'ITelemetryPlugin'. Refactored the Plugin to extend BaseTelemetryPlugin (part of the #1076 ...
Read more >
javascript - React with TypeScript: Type is not assignable to ...
IntrinsicAttributes refers to in-built types of React components. This error seems like you have either mistyped a component's props somewhere.
Read more >
React plug-in for Application Insights JavaScript SDK
Learn how to install and use the React plug-in for the Application Insights JavaScript SDK.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found