mac 下使用react-native init创建项目遇到 pod install报错

  • mac 下使用react-native init创建项目遇到 pod install报错

    [!] Invalid `Podfile` file: [!] /Volumes/app/ios/SDK/RnProject/node_modules/.bin/react-native config
    env: node: No such file or directory
     #  from /Volumes/app/ios/SDK/RnProject/ios/Podfile:36
     #  -------------------------------------------
     >    use_native_modules!
     #  end
     #  -------------------------------------------
    (node:24822) UnhandledPromiseRejectionWarning: Error: Failed to install CocoaPods dependencies for iOS project, which is required by this template.
    Please try again manually: "cd ./RnProject/ios && pod install".
    CocoaPods documentation:
        at installPods (/Volumes/app/ios/SDK/RnProject/node_modules/@react-native-community/cli/build/tools/installPods.js:148:13)
        at processTicksAndRejections (internal/process/task_queues.js:85:5)
    (node:24822) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 2)
    (node:24822) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.


Log in to reply