Error: ./node_modules/cls-hooked/context.js
Module not found: Error: Can't resolve 'async_hooks'
After adding the applicationinsights package, I am getting the above error in my application.
I have added it by using this syntax require('applicationinsights'). I believe the problem lies in the require keyword. I tried every other internet answer related to this error but nothing worked.
You are trying to use node.js appInsights. You have to use Angular's AppInsights package in Angular refer the below article
https://devblogs.microsoft.com/premier-developer/angular-how-to-add-application-insights-to-an-angular-spa/#:~:text=Step%202%20%E2%80%93%20Configure%20Angular%20application%20and%20include%20dependencies