I had Dynatrace properly integrated with Expo SDK 49. I did the upgrade to SDK 50 and then SDK 51 now and get the following error on my development client build (The preview and production channels seem to work fine.):
Unable to resolve "@dynatrace/react-native-plugin/jsx-dev-runtime" from "App.tsx"
I think the reason is that babel decides based on the environment if it uses jsx-runtime
or jsx-dev-runtime
. It seems that @dynatrace/react-native-plugin
doesn’t ships with jsx-dev-runtime
.
Anyone got this working?
Versions I use:
"expo": "^51.0.0",
"@dynatrace/react-native-plugin": "^2.295.1",
"@babel/core": "^7.25.2",
"@babel/parser": "^7.25.3",
"@babel/preset-env": "^7.25.3",
"babel-preset-expo": "~11.0.0",
2
Answers
This was fixed in the newest version of the dynatrace react-natvie-plugin:
I am trying to install Dynatrace with Expo SDK 50.0.19. I am using EAS. Can you share what you did during the installation and how you proceeded?
In my metro.config.js file, ‘react-native-svg-transformer’ is currently used. How did you add dynatrace babelTransformerPath and reporter?
My metro.config.js file is as follows.
My preset settings in my babel.config.js file are as follows.
My app/_layout.tsx file is as follows.
The error I get with ‘npm run dev’ is as follows.
error-image