以前的项目,客户报错了。没办法,要解决。
因为用到了react-native-webview,上网搜了相关的资源,发现最新版本的react-native解决了很多相关的问题,于是一路各种依赖升级,@tuya/tuya-panel-patches这个与涂鸦相关的依赖包也比较给力,竟然有对最新版本的支持,升级到0.72.7。
现在的问题是,编译通过了,yarn start 工程时报错了。根据提示,我在根目录下配置了metro.config.js:
Code: Select all
[code] const {getDefaultConfig, mergeConfig} = require('@react-native/metro-config');
Code: Select all
const config = {};
module.exports = mergeConfig(getDefaultConfig(__dirname), config);
module.exports = {
...getDefaultConfig(__dirname),
transformer: {
getTransformOptions: async () => ({
transform: {
experimentalImportSupport: false,
inlineRequires: false,
},
}),
},
resolver: {
/* resolver configs */
},
};
重新 run start ,又报错了:
Code: Select all
error listen EADDRINUSE: address already in use :::8081.
Error: listen EADDRINUSE: address already in use :::8081
at Server.setupListenHandle [as _listen2] (node:net:1817:16)
at listenInCluster (node:net:1865:12)
at Server.listen (node:net:1953:7)
这次怎么解决?哪位大侠指导一下,不胜感激呀,在线等!