microsoft / applicationinsights-angularplugin-js

MIT License
31 stars 17 forks source link

Incompatible with @microsoft/applicationinsights-web 2.7.0 #29

Closed StefanSchoof closed 2 years ago

StefanSchoof commented 3 years ago

after update @microsoft/applicationinsights-web from 2.6.5 to 2.7.0 I get a build error:

Error: src/app/app.component.ts:31:24 - error TS2322: Type 'AngularPlugin' is not assignable to type 'ITelemetryPlugin'.   
  Types of property 'processTelemetry' are incompatible.
    Type '(event: ITelemetryItem, itemCtx?: IProcessTelemetryContext | undefined) => void' is not assignable to type '(env: ITelemetryItem, itemCtx?: IProcessTelemetryContext | undefined) => void'.
      Types of parameters 'itemCtx' and 'itemCtx' are incompatible.
        Type 'import("<sourcefolder>/node_modules/@microsoft/applicationinsights-web/node_modules/@microsoft/applicationinsights-core-js/types/JavaScriptSDK.Interfaces/IProcessTelemetryContext").IProcessTelemetryContext | undefined' is not assignable to type 'import("<sourcefolder>/node_modules/@microsoft/applicationinsights-core-js/types/JavaScriptSDK.Interfaces/IProcessTelemetryContext").IProcessTelemetryContext 
| undefined'.
          Type 'import("<sourcefolder>/node_modules/@microsoft/applicationinsights-web/node_modules/@microsoft/applicationinsights-core-js/types/JavaScriptSDK.Interfaces/IProcessTelemetryContext").IProcessTelemetryContext' is not assignable to type 'import("<sourcefolder>/node_modules/@microsoft/applicationinsights-core-js/types/JavaScriptSDK.Interfaces/IProcessTelemetryContext").IProcessTelemetryContext'.
            The types of 'core().config.extensions' are incompatible between these types.
              Type 'import("<sourcefolder>/node_modules/@microsoft/applicationinsights-web/node_modules/@microsoft/applicationinsights-core-js/types/JavaScriptSDK.Interfaces/ITelemetryPlugin").ITelemetryPlugin[] | undefined' is not assignable to type 'import("<sourcefolder>/node_modules/@microsoft/applicationinsights-core-js/types/JavaScriptSDK.Interfaces/ITelemetryPlugin").ITelemetryPlugin[] | undefined'.
                Type 'import("<sourcefolder>/node_modules/@microsoft/applicationinsights-web/node_modules/@microsoft/applicationinsights-core-js/types/JavaScriptSDK.Interfaces/ITelemetryPlugin").ITelemetryPlugin[]' is not assignable to type 'import("<sourcefolder>/node_modules/@microsoft/applicationinsights-core-js/types/JavaScriptSDK.Interfaces/ITelemetryPlugin").ITelemetryPlugin[]'.
                  Type 'import("<sourcefolder>/node_modules/@microsoft/applicationinsights-web/node_modules/@microsoft/applicationinsights-core-js/types/JavaScriptSDK.Interfaces/ITelemetryPlugin").ITelemetryPlugin' is not assignable to type 'import("<sourcefolder>/node_modules/@microsoft/applicationinsights-core-js/types/JavaScriptSDK.Interfaces/ITelemetryPlugin").ITelemetryPlugin'.
                    Types of property 'processTelemetry' are incompatible.
                      Type '(env: import("<sourcefolder>/node_modules/@microsoft/applicationinsights-web/node_modules/@microsoft/applicationinsights-core-js/types/JavaScriptSDK.Interfaces/ITelemetryItem").ITelemetryItem, itemCtx?: import("<sourcefolder>/node_modules/@mic...' is not assignable to type '(env: import("<sourcefolder>/node_modules/@microsoft/applicationinsights-core-js/types/JavaScriptSDK.Interfaces/ITelemetryItem").ITelemetryItem, itemCtx?: import("<sourcefolder>/node_modules/@microsoft/applicationinsights-core-js/types/JavaScr...'.
                        Types of parameters 'itemCtx' and 'itemCtx' are incompatible.
                          Type 'import("<sourcefolder>/node_modules/@microsoft/applicationinsights-core-js/types/JavaScriptSDK.Interfaces/IProcessTelemetryContext").IProcessTelemetryContext | undefined' is not assignable to type 'import("<sourcefolder>/node_modules/@microsoft/applicationinsights-web/node_modules/@microsoft/applicationinsights-core-js/types/JavaScriptSDK.Interfaces/IProcessTelemetryContext").IProcessTelemetryContext | undefined'.
                            Type 'import("<sourcefolder>/node_modules/@microsoft/applicationinsights-core-js/types/JavaScriptSDK.Interfaces/IProcessTelemetryContext").IProcessTelemetryContext' is not assignable to type 'import("<sourcefolder>/node_modules/@microsoft/applicationinsights-web/node_modules/@microsoft/applicationinsights-core-js/types/JavaScriptSDK.Interfaces/IProcessTelemetryContext").IProcessTelemetryContext'.
                              The types of 'core().config.extensions' are incompatible between these types.
                                Type 'import("<sourcefolder>/node_modules/@microsoft/applicationinsights-core-js/types/JavaScriptSDK.Interfaces/ITelemetryPlugin").ITelemetryPlugin[] | undefined' is not assignable to type 'import("<sourcefolder>/node_modules/@microsoft/applicationinsights-web/node_modules/@microsoft/applicationinsights-core-js/types/JavaScriptSDK.Interfaces/ITelemetryPlugin").ITelemetryPlugin[] | undefined'.
                                  Type 'import("<sourcefolder>/node_modules/@microsoft/applicationinsights-core-js/types/JavaScriptSDK.Interfaces/ITelemetryPlugin").ITelemetryPlugin[]' is not assignable to type 'import("<sourcefolder>/node_modules/@microsoft/applicationinsights-web/node_modules/@microsoft/applicationinsights-core-js/types/JavaScriptSDK.Interfaces/ITelemetryPlugin").ITelemetryPlugin[]'.
                                    Type 'import("<sourcefolder>/node_modules/@microsoft/applicationinsights-core-js/types/JavaScriptSDK.Interfaces/ITelemetryPlugin").ITelemetryPlugin' is not assignable to type 'import("<sourcefolder>/node_modules/@microsoft/applicationinsights-web/node_modules/@microsoft/applicationinsights-core-js/types/JavaScriptSDK.Interfaces/ITelemetryPlugin").ITelemetryPlugin'.
                                      Types of property 'setNextPlugin' are incompatible.
                                        Type '((next: import("<sourcefolder>/node_modules/@microsoft/applicationinsights-core-js/types/JavaScriptSDK.Interfaces/ITelemetryPlugin").ITelemetryPlugin | import("<sourcefolder>/node_modules/@microsoft/applicationinsights-core-js/types/JavaScript...' is not assignable to type '((next: import("<sourcefolder>/node_modules/@microsoft/applicationinsights-web/node_modules/@microsoft/applicationinsights-core-js/types/JavaScriptSDK.Interfaces/ITelemetryPlugin").ITelemetryPlugin | import("<sourcefolder>/node_modules/@micros...'.
                                          Type '(next: import("<sourcefolder>/node_modules/@microsoft/applicationinsights-core-js/types/JavaScriptSDK.Interfaces/ITelemetryPlugin").ITelemetryPlugin | import("<sourcefolder>/node_modules/@microsoft/applicationinsights-core-js/types/JavaScriptS...' is not assignable to type '(next: import("<sourcefolder>/node_modules/@microsoft/applicationinsights-web/node_modules/@microsoft/applicationinsights-core-js/types/JavaScriptSDK.Interfaces/ITelemetryPlugin").ITelemetryPlugin | import("<sourcefolder>/node_modules/@microso...'.
                                            Types of parameters 'next' and 'next' are incompatible.
                                              Type 'import("<sourcefolder>/node_modules/@microsoft/applicationinsights-web/node_modules/@microsoft/applicationinsights-core-js/types/JavaScriptSDK.Interfaces/ITelemetryPlugin").ITelemetryPlugin | import("<sourcefolder>/node_modules/@microsoft/appl...' is not assignable to type 'import("<sourcefolder>/node_modules/@microsoft/applicationinsights-core-js/types/JavaScriptSDK.Interfaces/ITelemetryPlugin").ITelemetryPlugin | import("<sourcefolder>/node_modules/@microsoft/applicationinsights-core-js/types/JavaScriptSDK.Inte...'.
                                                Type 'ITelemetryPlugin' is not assignable to type 'ITelemetryPlugin | ITelemetryPluginChain'.

31           extensions: [angularPlugin],
                          ~~~~~~~~~~~~~
MSNev commented 2 years ago

Published v2.7.0 to NPM which includes the change to sync with application insights base 2.7.x

jmurphzyo commented 2 years ago

Did this ever make it into the package? I am still seeing this issue with

"@microsoft/applicationinsights-angularplugin-js": "^2.8.1", "@microsoft/applicationinsights-web": "^2.8.0",

rafagsiqueira commented 2 years ago

Same here. Type 'AngularPlugin' is not assignable to type 'ITelemetryPlugin'. "@microsoft/applicationinsights-angularplugin-js": "^2.8.1", "@microsoft/applicationinsights-web": "^2.8.0",

MSNev commented 2 years ago

@microsoft/applicationinsights-angularplugin-js v2.8.1 is not compatible with Application insights v.2.8.x, you should notice in the package.json that has 2.7.x listed as the compatible set. This was to address the angularplugin-js v2.8.0 issue which automatically updated to 2.8.0.

We have staged @microsoft/applicationinsights-angularplugin-js v2.9.0 which will be compatible with Application Insights v2.8.x, however, due to a couple of issues with Application insights (including v2.8.0 breaking TypeScript 3.x support) we need to release Application Insights v2.8.1 first to avoid compounding this issue even further -- this will (hopefully) occur today at which point I'll also publish @microsoft/applicationinsights-angularplugin-js v2.9.0 which should resolve this issue

MSNev commented 2 years ago

https://github.com/microsoft/ApplicationInsights-JS/issues/1807

AI release milestone with all of the associated issues https://github.com/microsoft/ApplicationInsights-JS/milestone/62

github-actions[bot] commented 1 year ago

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.