为什么来自 React 应用程序的 "Unhandled Runtime Error" 只能在 android 模拟器上遇到?

Why might an "Unhandled Runtime Error" from a React app be encountered only on android emulator?

我正在尝试在 Android 模拟器上的 chrome 上打开基于网络的 React-app,但出现以下错误: 未处理的运行时错误 未捕获的语法错误:意外的标记。

相同的应用程序可以通过本地主机上的 chrome 或我智能手机上的移动 chrome 打开,但不能在 android 模拟器上打开。有没有想过为什么会发生这种情况以及如何解决?

本地设置:

如果有人碰巧遇到同样的问题,解决方案是将以下包添加到 package.json 和 babel 配置插件中:

"@babel/plugin-proposal-nullish-coalescing-operator": "^7.14.5" / 
"@babel/plugin-proposal-optional-chaining": "^7.14.5"