【发布时间】:2021-08-12 00:03:08
【问题描述】:
我已按照upgrade helper 提供的所有说明将 RNv0.62 升级到 v0.64.1,并且我的应用程序已成功安装在设备中,但我的 Metro 捆绑程序失败,出现一些我无法理解的随机错误完全没有。
每当我尝试运行我的打包程序时,它都会抛出此错误TypeError: _this7._config.server.rewriteRequestUrl is not a function at node_modules/metro/src/Server.js:1011:39
如果有人可以帮助我,我应该怎么做才能调试它。
为了了解我在控制台中为我的项目和一个工作的 0.64.1 项目记录 _this7._config.server 对象所做的区别,显然它们都是不同的。
更新过程后我的_this7._config.server
{
useGlobalHotkey: true,
port: 8081,
enableVisualizer: false,
enhanceMiddleware: [Function (anonymous)],
runInspectorProxy: true,
verifyConnections: false
}
0.64.1 的其他 _this7._config.server 正在工作
{
useGlobalHotkey: true,
port: 8081,
enhanceMiddleware: [Function (anonymous)],
rewriteRequestUrl: [Function: rewriteRequestUrl],
runInspectorProxy: true,
verifyConnections: false
}
由于两者不同,我无法弄清楚到底出了什么问题
【问题讨论】:
标签: javascript typescript react-native babeljs react-native-android