Closed jbseppanen closed 7 months ago
Seeing the same issue with 0.22.7
Is this issue just limited to Jest? Is autocapture still working correctly?
Actually now I can't even run the app. It throws an error immediately saying error: index.ts: [BABEL]: Cannot find module 'babel-types'
I must not have had a clean build last time. So it appears that it's more than just testing.
Okay, I'm seeing the issue as well. I've determined the fix is:
const t = require('@babel/types');
const template = require('@babel/template').default;
I'll push a fix later today. Thanks for reporting this.
The fix has been released as 0.22.8
Index file found here requires
babel-types
andbabel-template
packages. https://github.com/heap/react-native-heap/blob/develop/instrumentor/src/index.js#L3-L4I attempted to replace those two imports with this:
const t = require('@babel/types');
const template = require('@babel/template');
That then changes the error to say
TypeError: [BABEL]: template is not a function
.This came from the PR here. I wanted that version (0.22.7) for the security audit fix that it brings. I'm not clear on what need to happen with the template in order to fix.