You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
lib throws error with "Cannot read property 'isNative' of undefined" #288
For seemingly unknown causes, when running transpiled code (either through ts-node, or running the plain javascript after transpiling it with tsc) the code throws the error "Cannot read property 'isNative' of undefined."
The piece of code that looks to be the problem is inside source-map-support, as follows:
if(frame.isNative())// Here sometimes "frame" is undefined
changed the title [-]lib throws error with "isNative of undefined"[/-][+]lib throws error with "Cannot read property 'isNative' of undefined"[/+]on Apr 29, 2021
I have also ran into this. I'm unsure exactly what causes it but found that some combination of using Bunyan logger in a promise chain caused the issue.
I found that changing this: myPromise().catch(logger.error)
to this: myPromise().catch(err => logger.error(err))
Activity
[-]lib throws error with "isNative of undefined"[/-][+]lib throws error with "Cannot read property 'isNative' of undefined"[/+]csjiang commentedon Feb 21, 2022
We're getting this issue too running node v14.17.6 and the following versions for source-maps:
craig552uk commentedon Aug 23, 2023
I have also ran into this. I'm unsure exactly what causes it but found that some combination of using Bunyan logger in a promise chain caused the issue.
I found that changing this:
myPromise().catch(logger.error)to this:
myPromise().catch(err => logger.error(err))stopped the issue.
I hope this helps someone.