ApplicationInsights-node.js
ApplicationInsights-node.js copied to clipboard
Cannot read properties of undefined
TypeError: Cannot read properties of undefined (reading 'trackEvent')
I am facing this error , and using code like that and using the latest package of applicationInsights : 3.7.0
appInsights.defaultClient?.trackEvent({})
please share how you are importing the "applicationinsights" in your code.
https://github.com/microsoft/ApplicationInsights-node.js/issues/1375
This might help you
@RN-Nitin Please share how you're importing the package and your call to trackEvent.