I'm trying to debug my android app with react native v0.66.1 and react native tools v1.8.1 in vsCode. But after running the app and attach to packager, or launch in debug mode,
I got this error com.facebook.react.commot.JavascriptException: Invalid or unexpected token
.
Asked
Active
Viewed 893 times
1

Er.Rohit Sharma
- 696
- 5
- 21
1 Answers
1
update babel.config.js of your project : (assume your metro-react-native-babel-preset is 0.58.0) from:
module.exports = {
presets: ['module:metro-react-native-babel-preset'],
};
to:
module.exports = {
presets: [['module:metro-react-native-babel-preset', {
unstable_disableES6Transforms: true
}]],
};
finally run yarn start --reset-cache to restart app.

Jitendrasinh Zala
- 151
- 13