ApplicationInsights-JS icon indicating copy to clipboard operation
ApplicationInsights-JS copied to clipboard

how to fix "NullInjectorError: No provider for AppInsightsSku!"

Open WeizhouWang opened this issue 2 years ago • 2 comments

try to add appInsights in an angular project following https://software-ranjit.medium.com/how-to-integrate-azure-application-insights-to-an-angular-application-15ffff977cc6, and get error: NullInjectorError: No provider for AppInsightsSku!

What should I do?

Thanks

WeizhouWang avatar Dec 14 '23 08:12 WeizhouWang

This sounds like an angular configuration issue, where you have not registered the provide for application insights. That is beyond to general knowledge of our team.

Suggest that you ask a question of the author of the post you reference, or check that you haven't missed something. It may also be some sort of difference between the version on Angular that the author documented vs the version you are using.

MSNev avatar Dec 14 '23 19:12 MSNev

Thanks Nev,

It is because I imported wrong service. Now it works.

WeizhouWang avatar Dec 15 '23 02:12 WeizhouWang