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

Doesn't support angular v16 #120

Open
CalvinGoA opened this issue Aug 25, 2023 · 7 comments
Open

Doesn't support angular v16 #120

CalvinGoA opened this issue Aug 25, 2023 · 7 comments
Assignees

Comments

@CalvinGoA
Copy link

Hi there,

I got errors out when installing to an app with angular 16. Please look into it.

Thanks,

@MSNev
Copy link
Contributor

MSNev commented Aug 25, 2023

Can you please supply more information, like

  • What version you are trying to install
  • Please include the errors in this issue

@CalvinGoA
Copy link
Author

PS C:\Projects\poc> npm install @microsoft/applicationinsights-angularplugin-js
npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR!
npm ERR! While resolving: @goa-poc/[email protected]
npm ERR! Found: @microsoft/[email protected]
npm ERR! node_modules/@microsoft/applicationinsights-analytics-js
npm ERR! @microsoft/applicationinsights-analytics-js@"3.0.2" from @microsoft/[email protected]
npm ERR! node_modules/@microsoft/applicationinsights-web
npm ERR! @microsoft/applicationinsights-web@"^3.0.2" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! @microsoft/applicationinsights-angularplugin-js@"" from the root project
npm ERR!
npm ERR! Conflicting peer dependency: @microsoft/[email protected]
npm ERR! node_modules/@microsoft/applicationinsights-analytics-js
npm ERR! peer @microsoft/applicationinsights-analytics-js@"^2.8.14" from @microsoft/[email protected]
npm ERR! node_modules/@microsoft/applicationinsights-angularplugin-js
npm ERR! @microsoft/applicationinsights-angularplugin-js@"
" from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR!
npm ERR! See C:\Users\calvi\AppData\Local\npm-cache\eresolve-report.txt for a full report.

npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\calvi\AppData\Local\npm-cache_logs\2023-08-25T19_51_35_470Z-debug-0.log

@MSNev
Copy link
Contributor

MSNev commented Aug 25, 2023

Ok,

It looks like you trying to use v3 of ApplicationInsights with the angular plugin?

We have not yet released an AI v3 compatible version of the anuglar plugin yet https://github.com/microsoft/applicationinsights-angularplugin-js#compatibility-matrix, we are actively working on creating a release which is being tracked by this milestone.

We are planning to release this shortly, which will then be followed rapidly with an Angular 15 targeted version (tracked with this milestone).

If either of these still do not work with Angular 16 then we will schedule a v16 release (based on the discussion issue in the first milestone)

@OzBob
Copy link

OzBob commented Sep 29, 2023

@CalvinGoA I got this combination working on Angular16:

  "@microsoft/applicationinsights-angularplugin-js": "^3.0.2",
  "@microsoft/applicationinsights-web": "^2.8.13",

@siyuniu-ms siyuniu-ms self-assigned this Oct 2, 2023
@zhucalvin
Copy link

zhucalvin commented Oct 5, 2023

After downgraded the version of "@microsoft/applicationinsights-web" from "^3.0.2" to "^2.8.13", and then execute:

npm i --save @microsoft/applicationinsights-angularplugin-js

Here it was the errors I received:
npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR!
npm ERR! While resolving: @calvin-demo/[email protected]
npm ERR! Found: @microsoft/[email protected]
npm ERR! node_modules/@microsoft/applicationinsights-analytics-js
npm ERR! @microsoft/applicationinsights-analytics-js@"2.8.16" from @microsoft/[email protected]
npm ERR! node_modules/@microsoft/applicationinsights-web
npm ERR! @microsoft/applicationinsights-web@"^2.8.13" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! @microsoft/applicationinsights-angularplugin-js@"" from the root project
npm ERR!
npm ERR! Conflicting peer dependency: @microsoft/[email protected]
npm ERR! node_modules/@microsoft/applicationinsights-analytics-js
npm ERR! peer @microsoft/applicationinsights-analytics-js@"^3.0.3" from @microsoft/[email protected]
npm ERR! node_modules/@microsoft/applicationinsights-angularplugin-js
npm ERR! @microsoft/applicationinsights-angularplugin-js@"
" from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.

@OzBob
Copy link

OzBob commented Oct 6, 2023

@zhucalvin you have one more package in your dependencies than I did.

you have "@microsoft/[email protected]"

it says it in the message you posted. look for the words "Conflicting peer dependency"

You must decide, whether or not you need "@microsoft/[email protected]". The message says:

npm ERR! peer ... from @microsoft/applicationinsights-angularplugin-js@15.0.0

  1. What happens if you remove it?

OR

  1. you can experiment with this combination:
  "@microsoft/applicationinsights-angularplugin-js": "^3.0.3",
  "@microsoft/applicationinsights-web": "^2.8.14",

@b-johnse
Copy link

version 17 also doesnt work. added the exact snippet from the readme after installing dependencies. put in my key. then attempted to ng serve. App previously loaded and worked, but now whitescreen with no console errors.

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

6 participants