Open feidaZhang opened 1 day ago
if i comment this line. There is no error but the file can not be deleted automatically.
function withSentryBabelTransformer(config) {
const defaultBabelTransformerPath = config.transformer && config.transformer.babelTransformerPath;
utils_1.logger.debug('Default Babel transformer path from `config.transformer`:', defaultBabelTransformerPath);
if (!defaultBabelTransformerPath) {
// This has to be console.warn because the options is enabled but won't be used
// eslint-disable-next-line no-console
console.warn('`transformer.babelTransformerPath` is undefined.');
// eslint-disable-next-line no-console
console.warn('Sentry Babel transformer cannot be used. Not adding it...');
return config;
}
if (defaultBabelTransformerPath) {
(0, sentryBabelTransformerUtils_1.saveDefaultBabelTransformerPath)(defaultBabelTransformerPath);
process.on('exit', () => {
// comment this line
// (0, sentryBabelTransformerUtils_1.cleanDefaultBabelTransformerPath)();
});
}
return Object.assign(Object.assign({}, config), { transformer: Object.assign(Object.assign({}, config.transformer), { babelTransformerPath: require.resolve('./sentryBabelTransformer') }) });
}
It's my device info. Model Name: MacBook Pro Model Identifier: MacBookPro17,1 Model Number: Z11C000BPCH/A Chip: Apple M1
Thanks @feidaZhang for the report, we'll investigate this and follow up here
OS:
Platform:
SDK:
@sentry/react-native
(>= 1.0.0)react-native-sentry
(<= 0.43.2)SDK version: 5.30.0
react-native
version: 0.72.12Are you using Expo?
I have the following issue:
After integrating
withSentryConfig
in themetro.config.js
,annotateReactComponents
is true, we found that when building iOS application through Xcode in debug mode, the.sentry/. defaultBabelTransformerPath
file was first created and then deleted before the build was completed. However, when loading the JS Bundle, sentry tried to read the file again and threw an error.Actual result:
Expected result:
no error