Stock React Native 应用程序不会在 iOS 上构建(asdf?)

sof*_*ode 1 nvm react-native asdf-vm

我需要一些帮助来让股票应用程序按照官方入门指南运行。

我下载的是iOS模拟器14.3。

我跑

npx react-native init nuproject

cd nuproject

npx react-native run-ios

我明白了

nvm is not compatible with the "PREFIX" environment variable: currently set to "/Users/me/.asdf/installs/nodejs/15.8.0/.npm"
Run `unset PREFIX` to unset it.
nvm is not compatible with the "PREFIX" environment variable: currently set to "/Users/me/.asdf/installs/nodejs/15.8.0/.npm"
Run `unset PREFIX` to unset it.
Command PhaseScriptExecution failed with a nonzero exit code


** BUILD FAILED **


The following build commands failed:
    PhaseScriptExecution [CP-User]\ Generate\ Specs /Users/me/Library/Developer/Xcode/DerivedData/nuproject-enujsutisqszfkeohcvaepmqnist/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/FBReactNativeSpec.build/Script-C635E97B268646534DBB9F9667109A6E.sh
(1 failure)

Run Code Online (Sandbox Code Playgroud)

这是我的反应本机环境,如果有帮助的话

$ npx react-native info
info Fetching system and libraries information...
System:
    OS: macOS 11.2.3
    CPU: (4) x64 Intel(R) Core(TM) i7-7660U CPU @ 2.50GHz
    Memory: 80.10 MB / 16.00 GB
    Shell: 5.8 - /bin/zsh
  Binaries:
    Node: 15.8.0 - ~/.asdf/installs/nodejs/15.8.0/bin/node
    Yarn: 1.22.10 - ~/.asdf/installs/nodejs/15.8.0/.npm/bin/yarn
    npm: 7.5.1 - ~/.asdf/installs/nodejs/15.8.0/bin/npm
    Watchman: 4.9.0 - /usr/local/bin/watchman
  Managers:
    CocoaPods: 1.10.1 - /usr/local/bin/pod
  SDKs:
    iOS SDK:
      Platforms: iOS 14.4, DriverKit 20.2, macOS 11.1, tvOS 14.3, watchOS 7.2
    Android SDK:
      API Levels: 29
      Build Tools: 28.0.3, 29.0.2, 29.0.3
      System Images: android-29 | Google APIs Intel x86 Atom, android-29 | Google Play Intel x86 Atom
      Android NDK: Not Found
  IDEs:
    Android Studio: 4.1 AI-201.8743.12.41.7199119
    Xcode: 12.4/12D4e - /usr/bin/xcodebuild
  Languages:
    Java: 1.8.0_242 - /Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home/bin/javac
  npmPackages:
    @react-native-community/cli: Not Found
    react: 17.0.1 => 17.0.1
    react-native: 0.64.0 => 0.64.0
    react-native-macos: Not Found
  npmGlobalPackages:
    *react-native*: Not Found
Run Code Online (Sandbox Code Playgroud)

sof*_*ode 9

事实证明我还没有从系统中完全删除 nvm。

rm -rf ~/.nvm

这就解决了问题。