ApplicationInsights-node.js icon indicating copy to clipboard operation
ApplicationInsights-node.js copied to clipboard

Cannot read properties of undefined

Open RN-Nitin opened this issue 7 months ago • 3 comments

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({})

RN-Nitin avatar Jul 22 '25 07:07 RN-Nitin

please share how you are importing the "applicationinsights" in your code.

shiva-bp avatar Jul 22 '25 15:07 shiva-bp

https://github.com/microsoft/ApplicationInsights-node.js/issues/1375

This might help you

shiva-bp avatar Jul 22 '25 16:07 shiva-bp

@RN-Nitin Please share how you're importing the package and your call to trackEvent.

JacksonWeber avatar Jul 29 '25 17:07 JacksonWeber