React Native - 错误 attachToServer 不是一个函数

4

执行命令:npx react-native start

TypeError: attachToServer is not a function
    at Object.runServer [as func] (E:\WiemIleJem\WiemCoJem\node_modules\@react-native-community\cli-plugin-metro\build\commands\start\runServer.js:131:7)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async Command.handleAction (E:\WiemIleJem\WiemCoJem\node_modules\@react-native-community\cli\build\index.js:192:9) ```

It's clean project created by command: npx react-native init
1个回答

5

你是最棒的!谢谢,它有效。 - AKK
对我来说没有解决,仍然存在这个问题。我看到大约2小时前有一个最新的React Native更新。我怀疑是一个有缺陷的发布版本。尝试使用以前的版本react-native init newproject --version X.XX.X - shogitai
1
这是 GitHub 问题链接,以便保持最新状态。https://github.com/react-native-community/cli/issues/1561 - blindgaenger

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接