[BUG] Type 'ReactPlugin' is not assignable to type 'ITelemetryPlugin'
See original GitHub issueA 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:
- Created 9 months ago
- Reactions:2
- Comments:12 (6 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
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.
@MSNev Changing the settings
skipLibCheck
andisolatedModules
has no effect. I’m using the latest typescript version (v4.9.4).