React Native在M1上使用VSCode进行调试

3

是否有最新的清单可以检查在Apple M1上设置VSCode React-Native开发环境时需要注意什么?

我能够运行代码,但似乎无法在VSCode中调试它。

这甚至给了我一个错误。从哪里开始思考呢?

xxxxx(主)

$ npx react-native doctor
⠇ Running diagnostics...error Reduce of empty array with no initial value.
TypeError: Reduce of empty array with no initial value
    at Array.reduce (<anonymous>)
    at Object.getDiagnostics (/Users/xxxxx/Projects/DoneWithIt/node_modules/@react-native-community/cli-doctor/build/tools/healthchecks/xcodeEnv.js:86:8)
    at /Users/xxxxx/Projects/DoneWithIt/node_modules/@react-native-community/cli-doctor/build/commands/doctor.js:145:29
    at Array.map (<anonymous>)
    at iterateOverHealthChecks (/Users/xxxxx/Projects/DoneWithIt/node_modules/@react-native-community/cli-doctor/build/commands/doctor.js:135:51)
    at Array.map (<anonymous>)
    at iterateOverCategories (/Users/xxxxx/Projects/DoneWithIt/node_modules/@react-native-community/cli-doctor/build/commands/doctor.js:168:70)
    at Object.doctorCommand [as func] (/Users/xxxxx/Projects/DoneWithIt/node_modules/@react-native-community/cli-doctor/build/commands/doctor.js:170:41)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async Command.handleAction (/Users/xxxxx/Projects/DoneWithIt/node_modules/@react-native-community/cli/build/index.js:190:9)
info Run CLI with --verbose flag for more details.

我认为你正在使用一个数组,但你没有添加它的初始值。 - Talha Akbar
2个回答

0

谢谢。已经点击了链接。第二个命令已经失败。brew install --cask adoptopenjdk8 错误:Cask adoptopenjdk8 存在于多个 tap 中: homebrew/cask-versions/adoptopenjdk8 adoptopenjdk/openjdk/adoptopenjdk8 - justdan0227

0

我刚刚发现这个问题是因为我重构/拆分了Android和IOS应用程序到不同的目录中。

解决方法就是简单地touch Podfile


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