我有一个 RN 项目,我已经在 Windows 11 机器上工作了几个月,并且安装了所有最新的 React Native 模块。我一直在 Android 模拟器和物理 iOS 17 设备 (iPhone 11 Max) 上进行测试。
EAS 开发在每个设备上都能正常工作。问题在于连接到 iOS 设备。直到最近,我还能够运行“npx expo start”并毫无问题地连接到我的 iPhone。现在,当我尝试运行相同的命令时,Expo Go 会指出“这花费的时间比应有的时间长得多......”并且从未连接。我还尝试使用“npx expo start --tunnel”,但我在终端中收到以下消息:
这是我的package.json:
"dependencies": {
"@eva-design/eva": "^2.2.0",
"@expo/ngrok": "^4.1.3",
"@gorhom/bottom-sheet": "^4.6.3",
"@react-native-async-storage/async-storage": "1.23.1",
"@react-native-community/checkbox": "0.5.17",
"@react-native-community/datetimepicker": "8.0.1",
"@react-native-community/geolocation": "3.2.1",
"@react-native-community/masked-view": "0.1.11",
"@react-navigation/core": "^6.4.16",
"@react-navigation/drawer": "6.7.0",
"@react-navigation/elements": "^1.3.30",
"@react-navigation/material-bottom-tabs": "6.2.28",
"@react-navigation/material-top-tabs": "6.6.13",
"@react-navigation/native": "6.1.17",
"@react-navigation/native-stack": "6.10.0",
"@react-navigation/routers": "6.1.9",
"@react-navigation/stack": "6.4.0",
"@ui-kitten/components": "5.3.1",
"autoprefixer": "9.8.6",
"axios": "1.7.2",
"bcryptjs": "2.4.3",
"body-parser": "1.20.2",
"date-fns": "3.6.0",
"eas-cli": "10.1.1",
"expo": "~51.0.18",
"expo-background-fetch": "^12.0.1",
"expo-checkbox": "3.0.0",
"expo-font": "12.0.7",
"expo-location": "^17.0.1",
"expo-notifications": "0.28.9",
"expo-status-bar": "~1.12.1",
"nativewind": "^2.0.11",
"postcss": "8.4.39",
"react": "18.2.0",
"react-moment": "1.1.3",
"react-native": "0.74.3",
"react-native-animatable": "1.4.0",
"react-native-bouncy-checkbox": "4.0.1",
"react-native-datepicker": "1.7.2",
"react-native-device-info": "11.1.0",
"react-native-dropdown-picker": "^5.4.6",
"react-native-geolocation-service": "5.3.1",
"react-native-gesture-handler": "2.16.1",
"react-native-maps": "1.14.0",
"react-native-modal": "13.0.1",
"react-native-modal-datetime-picker": "17.1.0",
"react-native-modals": "0.22.3",
"react-native-paper": "5.12.3",
"react-native-reanimated": "3.10.1",
"react-native-safe-area-context": "4.10.1",
"react-native-screens": "3.31.1",
"react-native-select-dropdown": "4.0.1",
"react-native-sse": "1.2.1",
"react-native-svg": "^15.4.0",
"react-native-toast-message": "2.2.0",
"react-native-uuid": "2.0.2",
"react-native-vector-icons": "10.1.0",
"react-scripts": "5.0.1",
"socket.io-client": "4.7.5",
"uuid": "10.0.0",
"zustand": "4.5.4"
},
"devDependencies": {
"@babel/core": "^7.20.0",
"tailwindcss": "3.3.2"
},
有什么建议吗?
输入“npx expo start --tunnel”时的输出为:
在 C:\Users\sully\Source\selectTest3 启动项目 启动 Metro Bundler 命令错误:类型错误 [ERR_INVALID_ARG_TYPE]:“文件”参数必须是字符串类型。收到空值 检查 Ngrok 状态页面是否有中断:https://status.ngrok.com/